ci: make integration-suite telemetry queries resilient to Datadog API 429s#1288
Merged
Merged
Conversation
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces flakiness in the integration test suite by adding retry handling for Datadog API rate limiting (HTTP 429) when querying telemetry, and by extending Jest timeouts to accommodate the additional waiting.
Changes:
- Added a shared
requestWithRetrywrapper for Datadog API calls to retry on HTTP 429 with bounded waits and jitter. - Wrapped trace/log/metric query calls in the integration test Datadog client utilities with the retry wrapper.
- Increased integration test timeouts (per-suite hooks and Jest global config) to 30 minutes.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| integration-tests/tests/utils/datadog.ts | Adds 429 retry logic and applies it to Datadog telemetry queries (traces/logs/metrics). |
| integration-tests/tests/snapstart.test.ts | Extends the beforeAll timeout to 30 minutes. |
| integration-tests/tests/payload-size.test.ts | Extends the beforeAll timeout to 30 minutes. |
| integration-tests/tests/otlp.test.ts | Extends the beforeAll timeout to 30 minutes. |
| integration-tests/tests/on-demand.test.ts | Extends the beforeAll timeout to 30 minutes. |
| integration-tests/tests/lmi.test.ts | Extends the beforeAll timeout to 30 minutes. |
| integration-tests/tests/custom-metrics.test.ts | Extends the beforeAll timeout to 30 minutes. |
| integration-tests/tests/auth.test.ts | Extends the beforeAll timeout to 30 minutes. |
| integration-tests/jest.config.js | Increases Jest testTimeout to 30 minutes. |
Comment on lines
+85
to
+86
| const jitter = Math.floor(Math.random() * 1000); | ||
| const wait = parseRetryAfterMs(error as AxiosError) + jitter; |
lym953
approved these changes
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
The integration tests intermittently fail due to not fetching telemetry data from Datadog due to 429, rate limit exceeded.
This PR adds retries for fetching telemetry data. Since we are now retrying, the total time of a test might increase. So, this PR also increase the test timeout from 15 minutes to 30 minutes.