Repository navigation
Support test automation exclusions in ScalaTest - #12946
calvinbayer wants to merge 2 commits into
Conversation
202e7f7 to
68b3c9f
Compare
f0feeb0 to
c0688be
Compare
68b3c9f to
9fda4c1
Compare
c0688be to
1273e6b
Compare
CI Visibility Test Environment - sbt-scalatestJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - nebula-release-pluginJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - pass4sJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - reactive-streams-jvmJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - netflix-zuulJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - heliboardJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - sonar-kotlinJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - jolokiaJob Status: 🟢 success
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
CI Visibility Test Environment - okhttpJob Status: 🔴 failed
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
🟡 Java Benchmark SLOs — Performance SLO warning (near threshold)
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
CI Visibility Test Environment - spring_bootJob Status: 🔴 failed
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
CI Visibility Test Environment - sonar-javaJob Status: 🔴 failed
Baseline: median of Tests run to verify that CI Visibility behavior has not regressed in the current PR. |
There was a problem hiding this comment.
Running a ScalaTest test by name bypasses declaration-tag collection, allowing Datadog retries and failure suppression despite explicit exclusions.
🤖 Bits Code Review · Commit 1273e6b
9fda4c1 to
1b32475
Compare
1273e6b to
22ed8f1
Compare
1b32475 to
b3d82b4
Compare
22ed8f1 to
3f80d84
Compare
There was a problem hiding this comment.
The supplied diff breaks older TestNG test suites and reinstalls Datadog retries after a user transformer explicitly disables them.
🤖 Bits Code Review · Commit 22ed8f1
Findings that could not be posted inline
dd-java-agent/instrumentation/testng/testng-common/src/main/java/datadog/trace/instrumentation/testng/TestNGUtils.java:78
Preserve transformer overrides that disable retries
When a user annotation transformer explicitly selects DisabledRetryAnalyzer, hasFrameworkOverride is true, but the native-analyzer check falls through and installs Datadog's RetryAnalyzer. With ATR or EFD enabled on an unexcluded test, this re-enables retries against the developer's setting and can turn a failing test into a passing build. Preserve explicit transformer overrides even when they disable retries.
if (RetryAnnotationTransformer.hasFrameworkOverride(annotation)) {
return;
}
if (TestExclusions.noAutoRetry(source, Arrays.asList(method.getGroups()))) {
React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it
What each reaction means
- 👍 Useful: correct, and you're fixing it or will.
- 👎 Wrong: the finding is incorrect, for example the bug can't happen or the code was misread.
- 😕 Unclear: you can't tell what it means or why it matters.
- 👀 Right, not acting: correct, but intended, out of scope for this PR, a known risk, or too minor.
🤖 Bits Code Review · Open Bits AI session
b3d82b4 to
2d52691
Compare
3f80d84 to
ed05308
Compare
|
Addressed the finding in this review with the inherited fix d308a2b. The regression first reproduced the bug: an explicit DisabledRetryAnalyzer override still executed six times with TestNG 7.0 ATR, and five/three times with latest TestNG ATR/EFD. The transformer now preserves every explicit framework override before installing Datadog policy. The full configured suite passes 308 cases with 101 capability skips, plus Muzzle, forbidden-API and module checks. The supported scenarios execute exactly once and emit no retry metadata. |
|
@autotest Review |
There was a problem hiding this comment.
More details
ScalaTest declaration exclusions reach policy selection and reporting while preserving developer-ignored tests and assigned Test Management properties.
🤖 Bits Code Review · Commit ed05308
2d52691 to
2d3b70b
Compare
ed05308 to
825c4de
Compare
|
@autotest Review |
There was a problem hiding this comment.
More details
Source inspection supports that ScalaTest declaration tags reach Datadog policy selection and reporting while preserving native ignore handling. No reportable defects were identified.
🤖 Bits Code Review · Commit 825c4de
2d3b70b to
3bf8026
Compare
825c4de to
627c8a5
Compare
|
@autotest Review |
There was a problem hiding this comment.
More details
The completed static review found no reportable defect in ScalaTest exclusion-policy selection or reporting, including preservation of native ignore behavior. Confidence is limited to source inspection; tests were not run.
🤖 Bits Code Review · Commit 627c8a5
| test("protected_failure", noRetry, preventSuppression) { | ||
| assert(false) | ||
| } | ||
|
|
||
| ignore("protected_skip", noRetry, preventSuppression) { | ||
| assert(false) | ||
| } |
There was a problem hiding this comment.
Looks like a coverage gap to me. Should there be separate tests for noRetry and preventSuppression?
There was a problem hiding this comment.
Yes, the ScalaTest fixture only exercises the two tags together, so it does not independently verify each flag at the integration boundary. The shared policy has a noRetry-only test, and reporting is parameterized over the individual tags, but those do not replace separate ScalaTest cases. I found no demonstrated behavior bug in the independent flag paths; I am deferring the additional integration coverage for discussion under the current bug-fix-only scope.
What Does This Do
Support test automation exclusions in ScalaTest. Wire test declaration metadata into Datadog policy selection and reporting, preserving assigned Test Management properties.
Motivation
Allow individual tests to prevent Datadog quarantine/disabling and exclude Datadog ATR, EFD and Attempt to Fix. Developer selection and framework retries retain their existing semantics.
Additional Notes
Stacked on
codex/karate-automation-exclusions; review this PR against its base for the framework-specific change. Shared public API and policy are introduced by the first JUnit4 PR. No refactor commit was needed.Validation: Module spotlessApply and instrumented ScalatestTest exclusion regression passed, including protected one-time failure, assignment tags, and developer-ignored test tags.
Snapshot dependency for inherited physical source paths: DataDog/test-environment#604.
test-environment-branch: codex/java-inherited-test-source-snapshots