feat(test-optimization)!: default Nx and Lage names#8268
Conversation
Signed-off-by: Juan Fernandez <[email protected]>
Overall package sizeSelf size: 5.71 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.1 | 82.56 kB | 817.39 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: de7a382 | Docs | Datadog PR Page | Give us feedback! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b1e3dd11a1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| it('returns the current Lage package name by default in v6', () => { | ||
| process.env.LAGE_PACKAGE_NAME = 'lage-package' | ||
|
|
||
| assert.strictEqual(getTestSessionName({}, 'jest', {}), 'lage-package') |
There was a problem hiding this comment.
Proxyquire DD_MAJOR for the v6 Lage assertion
When this patch is backported to a 5.x branch, this assertion imports getTestSessionName at file load using the branch’s real DD_MAJOR value, so with only LAGE_PACKAGE_NAME set it will return the trimmed command ('jest') instead of 'lage-package'. The config tests already inject ddMajor: 6 for the v6 behavior; this test needs the same isolation rather than depending on the checked-out package version, otherwise 5.x backport CI will fail despite the intended v5 opt-in behavior.
Useful? React with 👍 / 👎.
Signed-off-by: Juan Fernandez <[email protected]>
BenchmarksBenchmark execution time: 2026-05-05 10:20:14 Comparing candidate commit de7a382 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 1755 metrics, 89 unstable metrics. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
What does this PR do?
Makes v6 use
NX_TASK_TARGET_PROJECTas the default service name when no service is explicitly configured, andLAGE_PACKAGE_NAMEas the default test session name whenDD_TEST_SESSION_NAMEis not set.v5 behavior stays opt-in through
DD_ENABLE_NX_SERVICE_NAMEandDD_ENABLE_LAGE_PACKAGE_NAME.Motivation
These opt-in env vars were added to avoid breaking existing customers. v6 can take the breaking default behavior while keeping v5 compatible.