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

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

bric3and 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>
@bric3bric3 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 jpbempelMay 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 ownersMay 19, 2026 13:34
@bric3
bric3 requested review from vandonr and removed request for a teamMay 19, 2026 13:34
@bric3bric3 mentioned this pull request May 19, 2026
19 tasks
@pr-commenter

Copy link
Copy Markdown

Debugger benchmarks

Parameters

BaselineCandidate
baseline_or_candidatebaselinecandidate
ci_job_date17791973091779197658
end_time2026-05-19T13:30:002026-05-19T13:35:49
git_branchmasterbdu/gradle9-debugger-test-fixtures
git_commit_sha198a35d8ea5efc
start_time2026-05-19T13:28:302026-05-19T13:34:19
See matching parameters
BaselineCandidate
ci_job_id16945421911694542191
ci_pipeline_id113956760113956760
cpu_modelIntel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHzIntel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz
git_commit_date17791965141779196514

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:noprobeunstable
[-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:basicsamesamesameunstable
[-120.967µs; +32.294µs] or [-10.713%; +2.860%]
unstable
[-136.120op/s; +136.120op/s] or [-5.717%; +5.717%]
scenario:loopsamesamesamesamesame
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
ScenarioRequest median duration [CI 0.99]
noprobe360.712 µs [323.024 µs, 398.4 µs]
basic311.633 µs [304.009 µs, 319.256 µs]
loop9.005 ms [8.998 ms, 9.012 ms]
  • candidate results
ScenarioRequest median duration [CI 0.99]
noprobe357.001 µs [328.067 µs, 385.935 µs]
basic309.922 µs [302.688 µs, 317.156 µs]
loop9.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 queueMay 19, 2026
@dd-octo-sts

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351Bot commented May 19, 2026

Copy link
Copy Markdown

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-queueBot 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-cf854dBot merged commit 0bbc2b0 into masterMay 19, 2026
590 of 593 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854dBot deleted the bdu/gradle9-debugger-test-fixtures branch May 19, 2026 18:26
@github-actionsgithub-actionsBot added this to the 1.63.0 milestone May 19, 2026
@bric3bric3 mentioned this pull request May 21, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: toolingBuild & Toolingtag: ai generatedLargely based on code generated by an AI or LLMtag: no release notesChanges to exclude from release notestype: refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@bric3@jpbempel