fix(ci): fix test optimization upload broken by datadog-ci v5.13.0 requiring Node >= 20#3802
Merged
fix(ci): fix test optimization upload broken by datadog-ci v5.13.0 requiring Node >= 20#3802
Conversation
…ent wrapper @datadog/datadog-ci@5.13.0 bumped its minimum Node.js requirement to >=20. CI runners have Node 18, causing a ReferenceError: File is not defined crash and silently failing all test optimization uploads. Fix: raise the npx node version check from >=16 to >=20 so Node 18 runners fall back to the standalone binary instead. Also improve silent-upload-junit-to-datadog.sh to surface Warning/Error lines even when the upload script exits 0, so future failures are visible in CI logs.
bwoebi
approved these changes
Apr 16, 2026
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: f9b6b32 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
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.
Problem
Test optimization uploads have been silently failing on all CI jobs since
@datadog/datadog-ci@5.13.0was released, which bumped the minimum Node.js requirement to>=20. CI runners use Node 18, causing a hard crash:```
npm WARN EBADENGINE package: '@datadog/datadog-ci@5.13.0',
npm WARN EBADENGINE required: { node: '>=20' },
npm WARN EBADENGINE current: { node: 'v18.20.4', npm: '9.2.0' }
ReferenceError: File is not defined
```
Because
upload-junit-to-datadog.shexited 0 even on failure, andsilent-upload-junit-to-datadog.shdidn't propagate the exit code, the failure was completely invisible in CI output.Fix
upload-junit-to-datadog.sh: Raise the npx node version check from>=16to>=20. On Node 18 the script now falls back to the standalone binary (which has no Node version constraint) instead of invoking npx with a version that crashes at startup. Also exit 1 (instead of 0) whendatadog-ciactually fails to upload.silent-upload-junit-to-datadog.sh: Propagate the exit code from the inner script so failures are visible in CI logs and jobs fail as expected.