Skip to content

Forward JUnit 5 report entries to the original listener - #12697

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
daniel.mohedano/fix-junit5-report-entry-forwarding
Sep 30, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
daniel.mohedano/fix-junit5-report-entry-forwarding

Conversation

@daniel-mohedano

@daniel-mohedano daniel-mohedano commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

What Does This Do

Forwards JUnit 5 report entries to the original engine listener when CI Visibility is enabled.

CompositeEngineListener wraps JUnit's own listener so our tracing listener also sees execution events. Its reportingEntryPublished method called delegate.dynamicTestRegistered(testDescriptor) instead of delegate.reportingEntryPublished(testDescriptor, entry). This PR calls the right method.

Motivation

With the tracer attached, the bug had two effects:

  • Entries published with TestReporter.publishEntry(...) never reached the JUnit launcher, so build tools, IDEs and test reports lost them.
  • The launcher got a spurious "dynamic test registered" event for a test that was already registered. Listeners that count registrations counted it again. For example, SummaryGeneratingListener increments testsFound.

This affects JUnit 5, Spock and Cucumber, since all three instrumentations use this class. Users don't need to change anything.

Additional Notes

  • JUnit5Test has a new case. It runs a fixture that calls TestReporter.publishEntry("key", "value") through the real launcher with the agent attached. It checks that launcher listeners receive exactly that entry and that no dynamic test is registered.
  • runTests now returns its result listener, which also records report entries and dynamic registrations. Existing callers ignore the return value.
  • The new case fails without the fix. With the fix, spotlessCheck passes and all JUnit5Test cases pass in test, v513Test, latest5Test and latestDepTest (JUnit up to 6.1.3). Spock and Cucumber share the fixed class but have no dedicated check.

Contributor Checklist

@daniel-mohedano daniel-mohedano added type: bug fix Bug fix comp: ci visibility Continuous Integration Visibility tag: ai generated Largely based on code generated by an AI or LLM labels Sep 30, 2026
@daniel-mohedano
daniel-mohedano force-pushed the daniel.mohedano/fix-junit5-report-entry-forwarding branch from e3d5c37 to f20c893 Compare September 30, 2026 08:54
@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 68.82% (+9.59%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 369f4e8 | Docs | Give us feedback!

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - sbt-scalatest

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 54.03 56.55 $\color{green}{\blacktriangledown}$ -2.52 55.43 $\color{green}{\blacktriangledown}$ -1.40 96/266
agentEvpProxy 55.39 n/a n/a n/a n/a -

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - nebula-release-plugin

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 37.83 37.15 $\color{red}{\blacktriangle}$ +0.68 36.42 $\color{red}{\blacktriangle}$ +1.41 61/154
agentless 36.72 36.42 $\color{red}{\blacktriangle}$ +0.30 35.70 $\color{red}{\blacktriangle}$ +1.02 33/126
agentlessCodeCoverage 45.17 45.38 $\color{green}{\blacktriangledown}$ -0.21 44.48 $\color{red}{\blacktriangle}$ +0.69 33/126
agentlessLineCoverage 55.21 56.55 $\color{green}{\blacktriangledown}$ -1.34 56.55 $\color{green}{\blacktriangledown}$ -1.34 32/126

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - netflix-zuul

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 87.63 89.58 $\color{green}{\blacktriangledown}$ -1.95 87.80 $\color{green}{\blacktriangledown}$ -0.17 61/152
agentless 80.55 82.69 $\color{green}{\blacktriangledown}$ -2.14 81.05 $\color{green}{\blacktriangledown}$ -0.50 33/120
agentlessCodeCoverage 95.88 97.04 $\color{green}{\blacktriangledown}$ -1.16 97.04 $\color{green}{\blacktriangledown}$ -1.16 33/120
agentlessLineCoverage 111.63 113.88 $\color{green}{\blacktriangledown}$ -2.25 111.62 $\color{red}{\blacktriangle}$ +0.01 33/125

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - pass4s

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 8.89 10.54 $\color{green}{\blacktriangledown}$ -1.65 9.54 $\color{green}{\blacktriangledown}$ -0.65 61/136
agentless 8.11 9.73 $\color{green}{\blacktriangledown}$ -1.62 9.35 $\color{green}{\blacktriangledown}$ -1.24 33/108
agentlessCodeCoverage 18.64 17.73 $\color{red}{\blacktriangle}$ +0.91 16.36 $\color{red}{\blacktriangle}$ +2.28 32/102

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - reactive-streams-jvm

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 22.85 22.09 $\color{red}{\blacktriangle}$ +0.76 21.65 $\color{red}{\blacktriangle}$ +1.20 62/159
agentless 18.08 19.20 $\color{green}{\blacktriangledown}$ -1.12 19.20 $\color{green}{\blacktriangledown}$ -1.12 32/121
agentlessCodeCoverage 19.55 19.99 $\color{green}{\blacktriangledown}$ -0.44 19.99 $\color{green}{\blacktriangledown}$ -0.44 32/121
agentlessLineCoverage 27.60 26.98 $\color{red}{\blacktriangle}$ +0.62 26.98 $\color{red}{\blacktriangle}$ +0.62 22/69

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@dd-octo-sts

dd-octo-sts Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 13.97 s 13.91 s [-0.3%; +1.2%] (no difference)
startup:insecure-bank:tracing:Agent 12.92 s 12.97 s [-0.9%; +0.1%] (no difference)
startup:petclinic:appsec:Agent 16.97 s 16.39 s [-0.9%; +7.9%] (no difference)
startup:petclinic:iast:Agent 17.02 s 17.10 s [-1.3%; +0.3%] (no difference)
startup:petclinic:profiling:Agent 16.56 s 16.84 s [-2.7%; -0.6%] (maybe better)
startup:petclinic:sca:Agent 16.98 s 16.93 s [-0.5%; +1.1%] (no difference)
startup:petclinic:tracing:Agent 16.15 s 15.76 s [-1.7%; +6.7%] (no difference)

Commit: 369f4e8c · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - heliboard

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 6.49 9.92 $\color{green}{\blacktriangledown}$ -3.43 9.92 $\color{green}{\blacktriangledown}$ -3.43 32/120

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - sonar-kotlin

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 13.12 13.40 $\color{green}{\blacktriangledown}$ -0.28 13.13 $\color{green}{\blacktriangledown}$ -0.01 61/158
agentless 11.31 12.37 $\color{green}{\blacktriangledown}$ -1.06 11.88 $\color{green}{\blacktriangledown}$ -0.57 33/121
agentlessCodeCoverage 15.18 15.11 $\color{red}{\blacktriangle}$ +0.07 15.11 $\color{red}{\blacktriangle}$ +0.07 33/121
agentlessLineCoverage 16.25 17.73 $\color{green}{\blacktriangledown}$ -1.48 17.38 $\color{green}{\blacktriangledown}$ -1.13 33/122

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - jolokia

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 94.13 93.23 $\color{red}{\blacktriangle}$ +0.90 93.23 $\color{red}{\blacktriangle}$ +0.90 61/157
agentless 88.96 89.58 $\color{green}{\blacktriangledown}$ -0.62 89.58 $\color{green}{\blacktriangledown}$ -0.62 33/129
agentlessCodeCoverage 97.73 99.00 $\color{green}{\blacktriangledown}$ -1.27 99.00 $\color{green}{\blacktriangledown}$ -1.27 33/129
agentlessLineCoverage 100.69 101.00 $\color{green}{\blacktriangledown}$ -0.31 101.00 $\color{green}{\blacktriangledown}$ -0.31 33/134

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - okhttp

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 22.02 20.39 $\color{red}{\blacktriangle}$ +1.63 19.99 $\color{red}{\blacktriangle}$ +2.03 61/147
agentless 20.19 20.39 $\color{green}{\blacktriangledown}$ -0.20 19.59 $\color{red}{\blacktriangle}$ +0.60 34/117
agentlessCodeCoverage 25.04 23.45 $\color{red}{\blacktriangle}$ +1.59 22.99 $\color{red}{\blacktriangle}$ +2.05 34/117
agentlessLineCoverage 40.07 40.25 $\color{green}{\blacktriangledown}$ -0.18 39.45 $\color{red}{\blacktriangle}$ +0.62 34/118

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - spring_boot

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 16.42 16.36 $\color{red}{\blacktriangle}$ +0.06 16.36 $\color{red}{\blacktriangle}$ +0.06 61/145
agentless 9.87 9.92 $\color{green}{\blacktriangledown}$ -0.05 9.92 $\color{green}{\blacktriangledown}$ -0.05 33/115
agentlessCodeCoverage 13.85 13.67 $\color{red}{\blacktriangle}$ +0.18 13.67 $\color{red}{\blacktriangle}$ +0.18 33/115
agentlessLineCoverage 22.25 22.54 $\color{green}{\blacktriangledown}$ -0.29 22.54 $\color{green}{\blacktriangledown}$ -0.29 32/116

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

CI Visibility Test Environment - sonar-java

Job Status: 🟢 success

Scenario This PR (%) 7d median Δ 7d 30d median Δ 30d runs (7d/30d)
agent 22.30 18.08 $\color{red}{\blacktriangle}$ +4.22 14.23 $\color{red}{\blacktriangle}$ +8.07 61/158
agentless 20.84 8.29 $\color{red}{\blacktriangle}$ +12.55 11.19 $\color{red}{\blacktriangle}$ +9.65 35/130
agentlessCodeCoverage 104.49 87.80 $\color{red}{\blacktriangle}$ +16.69 77.88 $\color{red}{\blacktriangle}$ +26.61 35/130
agentlessLineCoverage 180.43 123.36 $\color{red}{\blacktriangle}$ +57.07 116.18 $\color{red}{\blacktriangle}$ +64.25 34/131

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

Tests run to verify that CI Visibility behavior has not regressed in the current PR.

@daniel-mohedano
daniel-mohedano marked this pull request as ready for review September 30, 2026 10:44
@daniel-mohedano
daniel-mohedano requested review from a team as code owners September 30, 2026 10:44
@daniel-mohedano
daniel-mohedano requested review from ygree and removed request for a team September 30, 2026 10:44
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-30T10:47:23.917041Z 369f4e8 Draft marked ready
🔒 Security Review ✅ Completed 2026-09-30T10:50:18.531991Z 369f4e8 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-prod-us1-3 datadog-prod-us1-3 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The corrected callback forwards each report entry with its original descriptor and payload, while the regression coverage also verifies that no spurious dynamic-test registration occurs.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 369f4e8 · @DataDog review to ask questions

@daniel-mohedano

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-09-30 10:49:56 UTC ℹ️ Start processing command /merge


2026-09-30 10:50:05 UTC ℹ️ MergeQueue: Pull request is not mergeable yet

It will be processed automatically as soon as GitHub reports it as mergeable. View in MergeQueue UI.

  • Run /code blockers to see what is blocking it.
  • Run /remove to cancel it.

2026-09-30 10:57:10 UTC ℹ️ MergeQueue: merge request added to the queue

The expected merge time in master is approximately 1h (p90).


2026-09-30 12:10:32 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit a6c1460 into master Sep 30, 2026
609 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the daniel.mohedano/fix-junit5-report-entry-forwarding branch September 30, 2026 12:10
@github-actions github-actions Bot added this to the 1.67.0 milestone Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: ci visibility Continuous Integration Visibility tag: ai generated Largely based on code generated by an AI or LLM type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants