Skip to content

Migrate debugger-integration-tests cross-project test source sharing to java-test-fixtures for Gradle 9.5 compatibility#11416

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
bdu/gradle9-debugger-test-fixtures
May 19, 2026
Merged

Migrate debugger-integration-tests cross-project test source sharing to java-test-fixtures for Gradle 9.5 compatibility#11416
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
bdu/gradle9-debugger-test-fixtures

Conversation

@bric3
Copy link
Copy Markdown
Contributor

@bric3 bric3 commented May 19, 2026

What Does This Do

Follow-up to #11367. Replaces the remaining project(':foo').sourceSets.test.output pattern that breaks under Gradle 9.5:

dd-smoke-tests/debugger-integration-tests/build.gradle:21 used:

testImplementation project(':dd-java-agent:agent-debugger').sourceSets.test.output

to pull two helper classes (LogProbeTestHelper, MoshiSnapshotTestHelper) from agent-debugger's test sources. Since the goal was to share test helpers with other projects, this fits the java-test-fixtures plugin: this PR migrates agent-debugger to that plugin, moves the two helpers from src/test/java/com/datadog/debugger/util/ to src/testFixtures/java/com/datadog/debugger/util/ (same package), and switches the consumer to testImplementation testFixtures(project(':dd-java-agent:agent-debugger')).

The 15 existing in-project consumers (test classes inside agent-debugger) keep working because the testFixtures source set is automatically added to the test source set's compile/runtime classpath.

A second commit removes the now-orphaned //testImplementation project(':dd-java-agent:instrumentation:mongo').sourceSets.test.output comment in mongo-common/build.gradle — it was left behind in #11367 as a marker for the broken pattern, but the migration is complete and the comment no longer serves any purpose.

Motivation

Prior to Gradle 9.5, project(':foo') in a dependencies {} block resolved to the real Project object, which gave access to the sourceSets property via Groovy magic.

However, Gradle 9.5 added a DependencyHandler.project(String) returning a ProjectDependency. In Groovy DSL closures this shadows Project.project(String), which was previously resolved as a "fallback" (since DependencyHandler had no project(String) overload before 9.5).

The actual instance returned is now a DefaultProjectDependency instead, which has no sourceSets properties, making the build fail with:

> Could not get unknown property 'sourceSets' for project '...' of type DefaultProjectDependency

Additional Notes

Follow-up to #11367, #10402, #11272.

Contributor Checklist

🤖 Generated with Claude Code

bric3 and others added 2 commits May 19, 2026 15:14
Gradle 9.5 added a `DependencyHandler.project(String)` overload that
returns a `ProjectDependency`. Inside a `dependencies { }` block, that
overload now shadows the `Project.project(String)` accessor that
previously resolved via Groovy fallback. Result:
`project(':foo').sourceSets` no longer reaches the producing project's
source sets — it hits a `DefaultProjectDependency` and fails with
"unknown property 'sourceSets'".

`dd-smoke-tests/debugger-integration-tests/build.gradle:21` used
`project(':dd-java-agent:agent-debugger').sourceSets.test.output` to
pull two helper classes (`LogProbeTestHelper`, `MoshiSnapshotTestHelper`)
from `agent-debugger`'s test sources.

Apply the canonical Gradle 9.5 fix (see #11367): expose the helpers via
the `java-test-fixtures` plugin on `agent-debugger`. The helpers move
from `src/test/java/com/datadog/debugger/util/` to
`src/testFixtures/java/com/datadog/debugger/util/` (same package), and
the consumer pulls them in via
`testImplementation testFixtures(project(':dd-java-agent:agent-debugger'))`.

The 15 existing in-project consumers (test classes inside agent-debugger)
keep working because the testFixtures source set is automatically on the
`test` source set's classpath.

This unblocks running the root build on Gradle 9.5.1.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ommon

The commented-out line was left behind in #11367 as a marker for the
broken Gradle 9.5 pattern. The 9 mongo consumers have since migrated to
`testFixtures(project(':...:mongo-common'))`, and the cross-project
`sourceSets.test.output` reference is no longer used. Drop the comment.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bric3 bric3 added tag: no release notes Changes to exclude from release notes comp: tooling Build & Tooling tag: ai generated Largely based on code generated by an AI or LLM type: refactoring labels May 19, 2026
@bric3 bric3 requested a review from jpbempel May 19, 2026 13:34
@bric3 bric3 marked this pull request as ready for review May 19, 2026 13:34
@bric3 bric3 requested review from a team as code owners May 19, 2026 13:34
@bric3 bric3 requested review from vandonr and removed request for a team May 19, 2026 13:34
@bric3 bric3 mentioned this pull request May 19, 2026
12 tasks
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented May 19, 2026

Debugger benchmarks

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
ci_job_date 1779197309 1779197658
end_time 2026-05-19T13:30:00 2026-05-19T13:35:49
git_branch master bdu/gradle9-debugger-test-fixtures
git_commit_sha 198a35d 8ea5efc
start_time 2026-05-19T13:28:30 2026-05-19T13:34:19
See matching parameters
Baseline Candidate
ci_job_id 1694542191 1694542191
ci_pipeline_id 113956760 113956760
cpu_model Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz
git_commit_date 1779196514 1779196514

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 9 metrics, 6 unstable metrics.

See unchanged results
scenario Δ mean agg_http_req_duration_min Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p75 Δ mean agg_http_req_duration_p99 Δ mean throughput
scenario:noprobe unstable
[-27.315µs; +22.445µs] or [-8.711%; +7.158%]
unstable
[-39.099µs; +31.676µs] or [-10.839%; +8.782%]
unstable
[-54.035µs; +42.478µs] or [-14.239%; +11.194%]
unstable
[-142.769µs; +81.626µs] or [-11.234%; +6.423%]
same
scenario:basic same same same unstable
[-120.967µs; +32.294µs] or [-10.713%; +2.860%]
unstable
[-136.120op/s; +136.120op/s] or [-5.717%; +5.717%]
scenario:loop same same same same same
Request duration reports for reports
gantt
    title reports - request duration [CI 0.99] : candidate=None, baseline=None
    dateFormat X
    axisFormat %s
section baseline
noprobe (360.712 µs) : 323, 398
.   : milestone, 361,
basic (311.633 µs) : 304, 319
.   : milestone, 312,
loop (9.005 ms) : 8998, 9012
.   : milestone, 9005,
section candidate
noprobe (357.001 µs) : 328, 386
.   : milestone, 357,
basic (309.922 µs) : 303, 317
.   : milestone, 310,
loop (9.011 ms) : 9004, 9018
.   : milestone, 9011,
Loading
  • baseline results
Scenario Request median duration [CI 0.99]
noprobe 360.712 µs [323.024 µs, 398.4 µs]
basic 311.633 µs [304.009 µs, 319.256 µs]
loop 9.005 ms [8.998 ms, 9.012 ms]
  • candidate results
Scenario Request median duration [CI 0.99]
noprobe 357.001 µs [328.067 µs, 385.935 µs]
basic 309.922 µs [302.688 µs, 317.156 µs]
loop 9.011 ms [9.004 ms, 9.018 ms]

@datadog-prod-us1-5

This comment has been minimized.

@bric3 bric3 added this pull request to the merge queue May 19, 2026
@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented May 19, 2026

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 Bot commented May 19, 2026

View all feedbacks in Devflow UI.

2026-05-19 17:03:51 UTC ℹ️ Start processing command /merge


2026-05-19 17:03:56 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-05-19 18:26:07 UTC ℹ️ MergeQueue: This merge request was merged

@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 19, 2026
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit 0bbc2b0 into master May 19, 2026
590 of 593 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the bdu/gradle9-debugger-test-fixtures branch May 19, 2026 18:26
@github-actions github-actions Bot added this to the 1.63.0 milestone May 19, 2026
@bric3 bric3 mentioned this pull request May 21, 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: 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.

2 participants