Skip to content

fix(ci): fix test optimization upload broken by datadog-ci v5.13.0 requiring Node >= 20#3802

Merged
Leiyks merged 3 commits intomasterfrom
leiyks/fix-test-optim-upload
Apr 16, 2026
Merged

fix(ci): fix test optimization upload broken by datadog-ci v5.13.0 requiring Node >= 20#3802
Leiyks merged 3 commits intomasterfrom
leiyks/fix-test-optim-upload

Conversation

@Leiyks
Copy link
Copy Markdown
Contributor

@Leiyks Leiyks commented Apr 16, 2026

Problem

Test optimization uploads have been silently failing on all CI jobs since @datadog/datadog-ci@5.13.0 was 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.sh exited 0 even on failure, and silent-upload-junit-to-datadog.sh didn'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 >=16 to >=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) when datadog-ci actually 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.

…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.
@Leiyks Leiyks requested a review from a team as a code owner April 16, 2026 11:48
@datadog-prod-us1-4
Copy link
Copy Markdown

datadog-prod-us1-4 Bot commented Apr 16, 2026

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 60.69% (+0.01%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: f9b6b32 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

@Leiyks Leiyks merged commit 217c346 into master Apr 16, 2026
2080 of 2098 checks passed
@Leiyks Leiyks deleted the leiyks/fix-test-optim-upload branch April 16, 2026 12:55
@github-actions github-actions Bot added this to the 1.19.0 milestone Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants