Skip to content

Commit

Permalink
Save both batch id and test run id
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernard Szabo committed Dec 16, 2024
1 parent cfa3888 commit a5cf469
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tubular/scripts/dd_synthetic_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
from dataclasses import dataclass

import click
import json
import logging
import os
import pprint
import requests
import time
import sys
Expand Down Expand Up @@ -47,12 +45,12 @@ def trigger_synthetic_tests(self, test_requests: [dict]) -> str:

try:
response_body = response.json()
# result = response_body['results'][0]
# aggregate_test_run_id = result['result_id']
aggregate_test_run_id = response_body['batch_id']
logging.info(f"Datadog test run launched: {aggregate_test_run_id}")
result = response_body['results'][0]
aggregate_test_run_id = result['result_id']
batch_id = response_body['batch_id']
logging.info(f"Datadog test run launched: {aggregate_test_run_id=} {batch_id=}")
self.test_run_id = aggregate_test_run_id
self.test_batch_id = aggregate_test_run_id # used when triggering with /ci option
self.test_batch_id = batch_id # used when triggering with /ci option
self.trigger_time = time.time() # Key timeouts off of this
logging.info(f'Tests triggered at time {self.trigger_time}')

Expand Down

0 comments on commit a5cf469

Please sign in to comment.