Skip to content

Migrate agent-bootstrap groovy files to java part 3 - #13228

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
masterfrom
jpbempel/g2j-agent-bootstrap-pt3
Nov 6, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
masterfrom
jpbempel/g2j-agent-bootstrap-pt3

Conversation

@jpbempel

@jpbempel jpbempel commented Nov 4, 2026

Copy link
Copy Markdown
Member

What Does This Do

we migrate 11 tests:

  • ClientIpAddressResolverSpecification
  • HttpResourceDecoratorTest
  • BaseDecoratorTest
  • ClientDecoratorTest
  • ServerDecoratorTest
  • HttpClientDecoratorTest
  • HttpServerDecoratorTest
  • UrlConnectionDecoratorTest
  • DatabaseClientDecoratorTest
  • DBTypeProcessingDatabaseClientDecoratorTest
  • OrmClientDecoratorTest

Motivation

this is part of the effort to migrate groovy tests to Java/JUnit

Additional Notes

Third batch of Groovy tests from dd-java-agent/agent-bootstrap; test counts are unchanged:

  • The decorator specs form one inheritance tree rooted at BaseDecoratorTest, and a Spock spec cannot extend a JUnit class, so the 9 classes are migrated together (hence the size of this PR). Inherited tests still re-run against each subclass's decorator through an overridable newDecorator().
  • Spock runs a base feature and a same-named subclass feature (test afterStart, test beforeFinish) both; they get distinct Java method names so JUnit keeps running both. The Gradle report used to hide the base test afterStart in Client-derived specs, so those classes now show one more test than before, while the number of tests that actually run is the same.
  • Spock where: tables become @TableTest, including FQN Class columns, map literals, and request/connection columns, so no @MethodSource is left except where rows need built objects (InetSocketAddress, Exception)
  • Spock Mock(...) becomes Mockito and Stub(...) becomes mock(..., RETURNS_MOCKS); 0 * _ becomes verifyNoMoreInteractions, _ * becomes atLeast(0) or a small helper that tolerates every setTag overload, and _ maps to any()/nullable(...) only where the original had a wildcard
  • The @Ignored DB-type afterStart feature is kept as @Disabled
  • HttpResourceDecoratorTest needs a fresh decorator per config, so HttpResourceDecorator's constructor becomes package-private with @VisibleForTesting

Contributor Checklist

Jira ticket: [PROJ-IDENT]

🤖 Generated with Claude Code

@jpbempel jpbempel added comp: testing Testing tag: no release notes Changes to exclude from release notes type: refactoring tag: ai generated Largely based on code generated by an AI or LLM labels Nov 4, 2026
@jpbempel
jpbempel marked this pull request as ready for review November 4, 2026 21:25
@jpbempel
jpbempel requested a review from a team as a code owner November 4, 2026 21:25
@jpbempel
jpbempel requested review from AlexeyKuznetsov-DD and removed request for a team November 4, 2026 21:25
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 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-11-04T21:32:13.889545Z 6a1f0ac 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-datadog-prod-us1-2 datadog-datadog-prod-us1-2 Bot left a comment

Copy link
Copy Markdown
Contributor

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

Static comparison found the migration preserves the original scenarios, inherited decorator coverage, and key assertions. Tests were not executed.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 6a1f0ac

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 63.39% (+3.41%)

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

@dd-octo-sts

dd-octo-sts Bot commented Nov 4, 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.02 s 14.03 s [-0.8%; +0.6%] (no difference)
startup:insecure-bank:tracing:Agent 13.00 s 12.99 s [-0.7%; +0.7%] (no difference)
startup:petclinic:appsec:Agent 17.15 s 16.98 s [+0.2%; +1.8%] (maybe worse)
startup:petclinic:iast:Agent 16.93 s 17.05 s [-1.6%; +0.2%] (no difference)
startup:petclinic:profiling:Agent 16.75 s 16.75 s [-1.0%; +1.0%] (no difference)
startup:petclinic:sca:Agent 17.05 s 16.41 s [-0.5%; +8.4%] (no difference)
startup:petclinic:tracing:Agent 16.10 s 16.05 s [-0.7%; +1.3%] (no difference)

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

@bric3 bric3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Left a few suggestions about inline comment moving on top of related statement.

@jpbempel
jpbempel added this pull request to the merge queue Nov 5, 2026
@dd-octo-sts

dd-octo-sts Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-11-05 15:47:26 UTC ℹ️ Start processing command /merge


2026-11-05 15:47:30 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-11-05 16:33:15 UTC ❌ MergeQueue: The build pipeline contains failing jobs for this merge request

Build pipeline has failing jobs for eabd33b:

⚠️ 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.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 5, 2026
@jpbempel

jpbempel commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-11-05 17:31:04 UTC ℹ️ Start processing command /merge


2026-11-05 17:31:09 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-11-05 18:51:49 UTC ❌ MergeQueue: The build pipeline failed for this merge request

Build pipeline has failing jobs for 9e75db6:

⚠️ 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.

@AlexeyKuznetsov-DD

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-11-06 01:59:41 UTC ℹ️ Start processing command /merge


2026-11-06 01:59:45 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-11-06 02:08:01 UTC ❌ MergeQueue: The build pipeline contains failing jobs for this merge request

Build pipeline has failing jobs for 578acb2:

⚠️ 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.

@jpbempel

jpbempel commented Nov 6, 2026

Copy link
Copy Markdown
Member Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-11-06 08:34:20 UTC ℹ️ Start processing command /merge


2026-11-06 08:34:24 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-11-06 08:41:41 UTC ❌ MergeQueue: The build pipeline contains failing jobs for this merge request

Build pipeline has failing jobs for f1f8a0c:

⚠️ 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.

jpbempel and others added 2 commits November 6, 2026 09:41
we migrate 11 tests:
 - ClientIpAddressResolverSpecification
 - HttpResourceDecoratorTest
 - BaseDecoratorTest
 - ClientDecoratorTest
 - ServerDecoratorTest
 - HttpClientDecoratorTest
 - HttpServerDecoratorTest
 - UrlConnectionDecoratorTest
 - DatabaseClientDecoratorTest
 - DBTypeProcessingDatabaseClientDecoratorTest
 - OrmClientDecoratorTest

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
 - use @TableTest for testOnError and testOnPeerConnection
 - reset HttpResourceNames through its reset() method
 - reword comments moved above their statement

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jpbempel
jpbempel force-pushed the jpbempel/g2j-agent-bootstrap-pt3 branch from 65fbc51 to cd3fe80 Compare November 6, 2026 08:42
@jpbempel
jpbempel added this pull request to the merge queue Nov 6, 2026
@dd-octo-sts

dd-octo-sts Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-11-06 10:40:47 UTC ℹ️ Start processing command /merge


2026-11-06 10:40:51 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-11-06 11:08:24 UTC ❌ MergeQueue: The build pipeline contains failing jobs for this merge request

Build pipeline has failing jobs for f103eb9:

⚠️ 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.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 6, 2026
@jpbempel

jpbempel commented Nov 6, 2026

Copy link
Copy Markdown
Member Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-11-06 15:40:03 UTC ℹ️ Start processing command /merge


2026-11-06 15:40:07 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-11-06 17:08:41 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 46fd587 into master Nov 6, 2026
684 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the jpbempel/g2j-agent-bootstrap-pt3 branch November 6, 2026 17:08
@github-actions github-actions Bot added this to the 1.69.0 milestone Nov 6, 2026
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: refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants