Skip to content

Close ServiceTalk captured context scope in test - #12500

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
andrea.marziali/diag-fix-servicetalk-context
Sep 16, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
andrea.marziali/diag-fix-servicetalk-context

Conversation

@amarziali

Copy link
Copy Markdown
Contributor

What Does This Do

Removes a redundant attachContext() call from the ServiceTalk context-preservation test.

The test attached the captured parent context twice:

  1. The first returned scope was discarded and never closed.
  2. The second scope was correctly managed with try-with-resources.

The first attachment was unnecessary and produced a genuine unclosed scope in the continuation diagnostics.

flowchart LR
    subgraph Before
        A1[Attach parent context] --> B1[Discard returned scope]
        B1 --> C1[Attach parent context again]
        C1 --> D1[Run child span]
        D1 --> E1[Close second scope]
        B1 --> F1[First scope remains open]
    end

    subgraph After
        A2[Attach parent context once] --> B2[Run child span]
        B2 --> C2[Close scope automatically]
    end
Loading

Motivation

The test should model the intended scope lifecycle rather than relying on an abandoned context attachment. The duplicate attachment did not contribute to the behavior being tested and could leave thread-local tracing state behind.

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@amarziali amarziali added the type: bug fix Bug fix label Sep 15, 2026
@amarziali
amarziali requested a review from a team as a code owner September 15, 2026 10:23
@amarziali amarziali added comp: testing Testing tag: no release notes Changes to exclude from release notes labels Sep 15, 2026
@amarziali
amarziali requested review from ValentinZakharov and removed request for a team September 15, 2026 10:23
@amarziali amarziali added the tag: ai generated Largely based on code generated by an AI or LLM label Sep 15, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 15, 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-15T10:24:58.820467Z baa89f6 PR opened
🔒 Security Review 🔄 Running since 2026-09-15T10:23:12.273480Z baa89f6 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-datadog-us1-prod datadog-datadog-us1-prod 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.

Datadog Autotest: PASS

More details

The change removes the duplicate context attachment. The try-with-resources attachment still sets the parent context for the child span.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit baa89f6 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@datadog-datadog-us1-prod

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

🟡 Java Benchmark SLOs — Performance SLO warning (near threshold)

Suite Status
Startup 🟡 warning

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.87 s 14.65 s [+0.5%; +2.5%] (maybe worse)
startup:insecure-bank:tracing:Agent 13.63 s 13.70 s [-1.3%; +0.2%] (no difference)
startup:petclinic:appsec:Agent 17.68 s 17.50 s [+0.1%; +2.0%] (maybe worse)
startup:petclinic:iast:Agent 17.47 s 17.64 s [-1.8%; -0.2%] (maybe better)
startup:petclinic:profiling:Agent 17.62 s 17.43 s [-0.1%; +2.3%] (no difference)
startup:petclinic:sca:Agent 17.66 s 17.60 s [-0.5%; +1.1%] (no difference)
startup:petclinic:tracing:Agent 16.64 s 16.66 s [-1.1%; +0.9%] (no difference)

Commit: baa89f63 · 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

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Sep 15, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-09-15 14:36:24 UTC ℹ️ Start processing command /merge


2026-09-15 14:36:29 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-09-15 15:15:15 UTCMergeQueue: The build pipeline contains failing jobs for this merge request

Build pipeline has failing jobs for fd1dc11:

⚠️ Do NOT retry failed jobs directly (why?).

What to do next?

  • Investigate the failures and when ready, re-add your pull request to the queue!
  • If your PR checks are green, try to rebase/merge. It might be because the CI run is a bit old.
  • Any question, go check the FAQ.
Details

Since those jobs are not marked as being allowed to fail, the pipeline will most likely fail.
Therefore, and to allow other builds to be processed, this merge request has been rejected and the pipeline got canceled.

@amarziali

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Sep 16, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-09-16 07:55:43 UTC ℹ️ Start processing command /merge


2026-09-16 07:55:48 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-09-16 08:52:01 UTCMergeQueue: The build pipeline contains failing jobs for this merge request

Build pipeline has failing jobs for bc6c40e:

⚠️ Do NOT retry failed jobs directly (why?).

What to do next?

  • Investigate the failures and when ready, re-add your pull request to the queue!
  • If your PR checks are green, try to rebase/merge. It might be because the CI run is a bit old.
  • Any question, go check the FAQ.
Details

Since those jobs are not marked as being allowed to fail, the pipeline will most likely fail.
Therefore, and to allow other builds to be processed, this merge request has been rejected and the pipeline got canceled.

@amarziali

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Sep 16, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-09-16 09:02:15 UTC ℹ️ Start processing command /merge


2026-09-16 09:02:20 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-09-16 10:14:19 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit fa0cc80 into master Sep 16, 2026
608 of 613 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the andrea.marziali/diag-fix-servicetalk-context branch September 16, 2026 10:14
@github-actions github-actions Bot added this to the 1.67.0 milestone Sep 16, 2026
jandro996 pushed a commit that referenced this pull request Sep 17, 2026
Close ServiceTalk captured context scope in test

Co-authored-by: andrea.marziali <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: testing Testing tag: ai generated Largely based on code generated by an AI or LLM 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