Skip to content

Fix flaky HugeClass smoke test - #12910

Open
jpbempel wants to merge 1 commit into
masterfrom
jpbempel/fix-huge-class-flaky-tests
Open

jpbempel wants to merge 1 commit into
masterfrom
jpbempel/fix-huge-class-flaky-tests

Conversation

@jpbempel

Copy link
Copy Markdown
Member

What Does This Do

in JDK8 debugger agent run async and SourceFileTracking is therefore racy.
Test need to be performed since JDK11
Make SourceFileTracking Synchronous for test

Motivation

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

in JDK8 debugger agent run async and SourceFileTracking is therefore
racy.
Test need to be performed since JDK11
Make SourceFileTracking Synchronous for test
@jpbempel
jpbempel requested a review from a team as a code owner October 16, 2026 13:56
@jpbempel
jpbempel requested review from ojung and removed request for a team October 16, 2026 13:56
@jpbempel jpbempel added the comp: debugger Dynamic Instrumentation label Oct 16, 2026
@dd-octo-sts

dd-octo-sts Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request

If you need help, please check our contributing guidelines.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 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-10-16T14:00:22.273318Z ca9c80a PR opened
ℹ️ 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.

@jpbempel jpbempel added type: bug fix Bug fix tag: no release notes Changes to exclude from release notes labels Oct 16, 2026
@jpbempel
jpbempel requested review from evanchooly and removed request for ojung October 16, 2026 13:57

@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

Synchronous source-file tracking makes the removed wait unnecessary, while the JDK 11 minimum excludes asynchronous Java 8 debugger startup. The completed static review identified no actionable regression.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit ca9c80a

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ca9c80a0c1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

value = "datadog.environment.JavaVirtualMachine#isJ9",
disabledReason = "Flaky on J9 JVMs")
// Test disabled for JDK8 as the debuggerAgent is started async for JDK < 9
@EnabledForJreRange(min = JRE.JAVA_11)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Remove the flaky quarantine after stabilizing the test

The new synchronization and JRE guard leave this method annotated with @Flaky; because CI skips flaky tests by default, the HugeClass regression still receives no normal CI coverage and this fix is not exercised there. Remove the existing @Flaky annotation once the race is addressed.

AGENTS.md reference: AGENTS.md:L68-L69

Useful? React with 👍 / 👎.

Comment on lines +35 to +36
additionalJvmArgs.add(
"-Ddd.internal.dynamic.instrumentation.synchronous.source.file.tracking.enabled=true");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Scope synchronous tracking to the HugeClass test

Because this setup runs before every method, the internal switch makes the entire ProbeStateIntegrationTest class use SynchronousSourceFileTrackingTransformer, whose production default is false. In particular, testAddSourceFileProbeLargeInnerClasses() no longer exercises the normal asynchronous queue/flush path, so regressions in that path can pass this smoke test; use TestInfo to add the argument only for the HugeClass case (or isolate that case in a separate class).

Useful? React with 👍 / 👎.

@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 59.43% (-0.38%)

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

@dd-octo-sts

dd-octo-sts Bot commented Oct 16, 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.90 s 13.93 s [-0.9%; +0.5%] (no difference)
startup:insecure-bank:tracing:Agent 12.82 s 12.92 s [-1.3%; -0.1%] (maybe better)
startup:petclinic:appsec:Agent 16.63 s 16.99 s [-6.6%; +2.4%] (no difference)
startup:petclinic:iast:Agent 16.84 s 16.98 s [-1.5%; -0.2%] (maybe better)
startup:petclinic:profiling:Agent 16.69 s 16.69 s [-1.2%; +1.2%] (no difference)
startup:petclinic:sca:Agent 17.04 s 17.03 s [-1.0%; +1.0%] (no difference)
startup:petclinic:tracing:Agent 16.14 s 16.24 s [-1.4%; +0.3%] (no difference)

Commit: ca9c80a0 · 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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: debugger Dynamic Instrumentation tag: no release notes Changes to exclude from release notes type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants