From 85ee794a6d8c9c8459312bb52184c3e00f478b8e Mon Sep 17 00:00:00 2001 From: Bernard Szabo Date: Tue, 18 Feb 2025 14:28:31 -0500 Subject: [PATCH 1/2] feat: Trigger tests pipeline diagnostic --- tubular/scripts/dd_synthetic_tests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tubular/scripts/dd_synthetic_tests.py b/tubular/scripts/dd_synthetic_tests.py index 7b317856..ece4f864 100644 --- a/tubular/scripts/dd_synthetic_tests.py +++ b/tubular/scripts/dd_synthetic_tests.py @@ -129,6 +129,7 @@ def _trigger_batch_tests(self): } test_public_ids = self.tests_by_public_id.keys() json_request_body = {"tests": [{"public_id": public_id} for public_id in test_public_ids]} + logging.info(f'Trigger request body: {json_request_body}') response = requests.post(url, headers=headers, json=json_request_body) if response.status_code != 200: raise Exception(f"Datadog API error. Status = {response.status_code}") From 08a7c2a66b27279750cd4ab73df68e3c7bfeb313 Mon Sep 17 00:00:00 2001 From: bszabo Date: Wed, 19 Feb 2025 07:58:50 -0500 Subject: [PATCH 2/2] feat: Fix Datadog secrets names --- tubular/scripts/dd_synthetic_tests.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tubular/scripts/dd_synthetic_tests.py b/tubular/scripts/dd_synthetic_tests.py index ece4f864..eefd9ad1 100644 --- a/tubular/scripts/dd_synthetic_tests.py +++ b/tubular/scripts/dd_synthetic_tests.py @@ -129,7 +129,6 @@ def _trigger_batch_tests(self): } test_public_ids = self.tests_by_public_id.keys() json_request_body = {"tests": [{"public_id": public_id} for public_id in test_public_ids]} - logging.info(f'Trigger request body: {json_request_body}') response = requests.post(url, headers=headers, json=json_request_body) if response.status_code != 200: raise Exception(f"Datadog API error. Status = {response.status_code}") @@ -247,8 +246,8 @@ def run_synthetic_tests(enable_automated_rollbacks, timeout, tests): sys.exit(1) try: - api_key = os.getenv("DATADOG_API_KEY") - app_key = os.getenv("DATADOG_APP_KEY") + api_key = os.getenv("DATADOG_API_KEY_SYNTHETIC_TEST") + app_key = os.getenv("DATADOG_APP_KEY_SYNTHETIC_TEST") dd_client = DatadogClient(api_key, app_key) dd_client.timeout_secs = timeout