Skip to content

Prevent completed scope diagnostic commands from failing smoke tests - #13076

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
andrea.marziali/fix-scope-diagnostics-command-replay
Oct 27, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
andrea.marziali/fix-scope-diagnostics-command-replay

Conversation

@amarziali

Copy link
Copy Markdown
Contributor

What Does This Do

The scope diagnostics companion kept reopening an already handled command every 20 ms. In the CI job, a transient Cannot allocate memory error during one of those reads stopped its control thread and caused later tests to fail.

Consume each command before publishing its response, and retry a new command read up to five times on I/O failure.

Motivation

Additional Notes

Fixes errors like: datadog.smoketest.SpringBootGrpcCompletableFutureTest > greeter 197 th time. Its stack trace, with the report directory shortened, was:

java.lang.AssertionError: Companion agent failed:
  detail=java.io.FileNotFoundException: .../scope-diagnostics-SpringBootGrpcCompletableFutureTest-0-16862891627160856320/command (Cannot allocate memory)
  seq=393, status=error
    at datadog.smoketest.ScopeDiagnosticsClient.failure(ScopeDiagnosticsClient.java:260)
    at datadog.smoketest.ScopeDiagnosticsClient.await(ScopeDiagnosticsClient.java:176)
    at datadog.smoketest.ScopeDiagnosticsClient.request(ScopeDiagnosticsClient.java:154)
    at datadog.smoketest.ScopeDiagnosticsClient.finish(ScopeDiagnosticsClient.java:126)
    at datadog.smoketest.ProcessManager.checkScopeDiagnostics(ProcessManager.groovy:146)
    at datadog.smoketest.ProcessManager.cleanup(ProcessManager.groovy:140)

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@amarziali
amarziali requested review from a team as code owners October 27, 2026 15:05
@amarziali
amarziali removed the request for review from a team October 27, 2026 15:05
@amarziali amarziali added the type: bug fix Bug fix label Oct 27, 2026
@amarziali amarziali added tag: no release notes Changes to exclude from release notes comp: tooling Build & Tooling labels Oct 27, 2026
@amarziali
amarziali requested review from jordan-wong and removed request for a team October 27, 2026 15:05
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 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-27T15:07:57.812603Z bc08a41 PR opened
🔒 Security Review ✅ Completed 2026-10-27T15:09:10.282356Z bc08a41 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.

@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 client waits for each response before sending another command, so consuming the command before responding preserves the protocol and prevents completed commands from being reread. The static reviewer found no actionable regressions.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit bc08a41

@datadog-prod-us1-3

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

Copy link
Copy Markdown

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 69.35% (+9.89%)

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

@dd-octo-sts

dd-octo-sts Bot commented Oct 27, 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 14.79 s 14.71 s [-0.2%; +1.3%] (no difference)
startup:insecure-bank:tracing:Agent 13.56 s 13.81 s [-2.8%; -0.8%] (maybe better)
startup:petclinic:appsec:Agent 17.24 s 17.16 s [-0.5%; +1.4%] (no difference)
startup:petclinic:iast:Agent 17.16 s 17.13 s [-0.7%; +0.9%] (no difference)
startup:petclinic:profiling:Agent 16.71 s 16.77 s [-1.5%; +0.7%] (no difference)
startup:petclinic:sca:Agent 17.23 s 17.01 s [+0.4%; +2.1%] (maybe worse)
startup:petclinic:tracing:Agent 16.22 s 16.20 s [-0.9%; +1.3%] (no difference)

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

@amarziali
amarziali enabled auto-merge October 27, 2026 15:47
@amarziali
amarziali added this pull request to the merge queue Oct 27, 2026
@dd-octo-sts

dd-octo-sts Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-10-27 15:56:48 UTC ℹ️ Start processing command /merge


2026-10-27 15:56:53 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-10-27 16:12:57 UTC 🚨 MergeQueue: This merge request is in error because of DDCI

DDCI pipeline didn't start (sourcing_failed)... Please retry.

DDCI Change Request: 5026263311099658554
You can get help from #ci-infra-support

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 27, 2026
@amarziali

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-10-27 16:26:44 UTC ℹ️ Start processing command /merge


2026-10-27 16:26:48 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-10-27 18:18:25 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 453e9ea into master Oct 27, 2026
612 of 615 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the andrea.marziali/fix-scope-diagnostics-command-replay branch October 27, 2026 18:18
@github-actions github-actions Bot added this to the 1.69.0 milestone Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: tooling Build & Tooling 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