|
2 | 2 | import logging |
3 | 3 | import time |
4 | 4 | import pytest |
| 5 | +import warnings |
5 | 6 | from datetime import datetime, timezone |
6 | 7 |
|
7 | 8 | from eval_protocol.log_utils.elasticsearch_direct_http_handler import ElasticsearchDirectHttpHandler |
8 | 9 | from eval_protocol.log_utils.elasticsearch_client import ElasticsearchClient |
9 | 10 | from eval_protocol.pytest.elasticsearch_setup import ElasticsearchSetup |
10 | 11 | from eval_protocol.types.remote_rollout_processor import ElasticsearchConfig |
11 | 12 |
|
| 13 | +# DEPRECATION WARNING: These Elasticsearch integration tests are deprecated |
| 14 | +# in favor of Fireworks tracing integration tests. See: |
| 15 | +# tests/logging/test_fireworks_tracing_integration.py |
| 16 | +warnings.warn( |
| 17 | + "Elasticsearch integration tests are deprecated. " |
| 18 | + "Use Fireworks tracing integration tests instead: " |
| 19 | + "tests/logging/test_fireworks_tracing_integration.py", |
| 20 | + DeprecationWarning, |
| 21 | + stacklevel=2, |
| 22 | +) |
| 23 | + |
12 | 24 |
|
13 | 25 | @pytest.fixture |
14 | 26 | def rollout_id(): |
@@ -110,6 +122,7 @@ def clear_elasticsearch_before_test( |
110 | 122 | print(f"Warning: Failed to clear Elasticsearch index before test: {e}") |
111 | 123 |
|
112 | 124 |
|
| 125 | +@pytest.mark.skip(reason="Deprecated: Use Fireworks tracing integration tests instead") |
113 | 126 | def test_elasticsearch_direct_http_handler_sends_logs( |
114 | 127 | elasticsearch_client: ElasticsearchClient, test_logger: logging.Logger, rollout_id: str |
115 | 128 | ): |
@@ -159,6 +172,7 @@ def test_elasticsearch_direct_http_handler_sends_logs( |
159 | 172 | print(f"Successfully verified log message in Elasticsearch: {test_message}") |
160 | 173 |
|
161 | 174 |
|
| 175 | +@pytest.mark.skip(reason="Deprecated: Use Fireworks tracing integration tests instead") |
162 | 176 | def test_elasticsearch_direct_http_handler_sorts_logs_chronologically( |
163 | 177 | elasticsearch_client: ElasticsearchClient, test_logger: logging.Logger, rollout_id: str |
164 | 178 | ): |
@@ -212,6 +226,7 @@ def test_elasticsearch_direct_http_handler_sorts_logs_chronologically( |
212 | 226 | print(f"Timestamps in order: {found_timestamps}") |
213 | 227 |
|
214 | 228 |
|
| 229 | +@pytest.mark.skip(reason="Deprecated: Use Fireworks tracing integration tests instead") |
215 | 230 | def test_elasticsearch_direct_http_handler_includes_rollout_id( |
216 | 231 | elasticsearch_client: ElasticsearchClient, test_logger: logging.Logger, rollout_id: str |
217 | 232 | ): |
@@ -269,6 +284,7 @@ def test_elasticsearch_direct_http_handler_includes_rollout_id( |
269 | 284 | print(f"Successfully verified log message with rollout_id '{rollout_id}' in Elasticsearch: {test_message}") |
270 | 285 |
|
271 | 286 |
|
| 287 | +@pytest.mark.skip(reason="Deprecated: Use Fireworks tracing integration tests instead") |
272 | 288 | def test_elasticsearch_direct_http_handler_search_by_rollout_id( |
273 | 289 | elasticsearch_client: ElasticsearchClient, test_logger: logging.Logger, rollout_id: str |
274 | 290 | ): |
@@ -337,6 +353,7 @@ def test_elasticsearch_direct_http_handler_search_by_rollout_id( |
337 | 353 | print("Verified that search for different rollout_id returns 0 results") |
338 | 354 |
|
339 | 355 |
|
| 356 | +@pytest.mark.skip(reason="Deprecated: Use Fireworks tracing integration tests instead") |
340 | 357 | def test_elasticsearch_direct_http_handler_logs_status_info( |
341 | 358 | elasticsearch_client: ElasticsearchClient, test_logger: logging.Logger, rollout_id: str |
342 | 359 | ): |
@@ -402,6 +419,7 @@ def test_elasticsearch_direct_http_handler_logs_status_info( |
402 | 419 | print(f"Successfully verified Status logging with code {test_status.code.value} in Elasticsearch: {test_message}") |
403 | 420 |
|
404 | 421 |
|
| 422 | +@pytest.mark.skip(reason="Deprecated: Use Fireworks tracing integration tests instead") |
405 | 423 | def test_elasticsearch_direct_http_handler_search_by_status_code( |
406 | 424 | elasticsearch_client: ElasticsearchClient, test_logger: logging.Logger, rollout_id: str |
407 | 425 | ): |
@@ -460,6 +478,7 @@ def test_elasticsearch_direct_http_handler_search_by_status_code( |
460 | 478 | print(f"Successfully verified search by status code {running_status.value} found {len(hits)} log messages") |
461 | 479 |
|
462 | 480 |
|
| 481 | +@pytest.mark.skip(reason="Deprecated: Use Fireworks tracing integration tests instead") |
463 | 482 | def test_elasticsearch_direct_http_handler_rollout_id_from_extra_overrides_env( |
464 | 483 | elasticsearch_client: ElasticsearchClient, test_logger: logging.Logger, rollout_id: str |
465 | 484 | ): |
@@ -539,6 +558,7 @@ def test_elasticsearch_direct_http_handler_rollout_id_from_extra_overrides_env( |
539 | 558 | print(f"Successfully verified rollout_id override: extra '{extra_rollout_id}' overrode environment '{rollout_id}'") |
540 | 559 |
|
541 | 560 |
|
| 561 | +@pytest.mark.skip(reason="Deprecated: Use Fireworks tracing integration tests instead") |
542 | 562 | def test_elasticsearch_direct_http_handler_timestamp_format( |
543 | 563 | elasticsearch_client: ElasticsearchClient, test_logger: logging.Logger, rollout_id: str |
544 | 564 | ): |
|
0 commit comments