Skip to content

Allow Gradle smoke tests to run on Gradle 9.x - #11490

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
bdu/gradle9-gradle-smoke-tests
May 28, 2026
Merged

Allow Gradle smoke tests to run on Gradle 9.x#11490
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
bdu/gradle9-gradle-smoke-tests

Conversation

@bric3

@bric3bric3 commented May 28, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

Fix :dd-smoke-tests:gradle under Gradle 9.5.1.

Smoke test uses the Gradle Test provided by the current Gradle version. Bumping to major 9.x also bumped the minimum legacy version. 3.x is not anymore available under Gradle 9. This PR allow to skip the tests if it's untestable with the current test kit. Given this PR still runs on Gradle 8.x 3.5 remains listed.

Note

It's worth noting this smoke test is a best-effort to test old legacy Gradle versions.

Also, this now isolates the nested distribution setup with a temporary GRADLE_USER_HOME, it also ensure a static dispatch on the TestHttpServer.handle overrides used by this path, to cover Groovy 4 restriction in that area.

The legacy Gradle event fixtures are also refreshed for the ITR tests-skipping metadata emitted by the current tracer. THis appear to take the same approach as #11453.

Part of #10402 and #11272.

Motivation

Gradle 9.5.1's TestKit no longer runs the old Gradle 3.5 fixture. We still want coverage for the earliest Gradle version the current TestKit can execute, and the test now says that explicitly instead of letting the policy live only in CI behavior.

Additional Notes

Validation used while preparing this branch:

  • ./gradlew :dd-smoke-tests:gradle:test -PtestJvm=8
  • ./gradlew :dd-smoke-tests:gradle:test
  • ./gradlew :dd-smoke-tests:gradle:spotlessJavaCheck

Contributor Checklist

  • Format the title according to the contribution guidelines
  • Assign the type: and (comp: or inst:) labels in addition to any other useful labels
  • Avoid using close, fix, or any linking keywords when referencing an issue
    Use solves instead, and assign the PR milestone to the issue
  • Update the CODEOWNERS file on source file addition, migration, or deletion
  • Update public documentation with any new configuration flags or behaviors
  • Add your completed PR to the merge queue by commenting /merge. You can also:
    • Customize the commit message associated with the merge with /merge --commit-message "..."
    • Remove your PR from the merge queue with /merge -c
    • Skip all merge queue checks with /merge -f --reason "reason"; please use this judiciously, as some checks do not run at the PR-level
    • Get more information in this doc

Jira ticket: [PROJ-IDENT]

bric3 added 2 commits May 28, 2026 14:54
Gradle 9 bundles Groovy 4. The :dd-smoke-tests:gradle module uses
`gradleTestKit()`, as a result Gradle's groovy 4.x ends up on the p
project classpath.
Groovy 4 tightened `MetaClassImpl` overload resolution. While the
previous `super.handle(...)` call in `MethodSpec`, `HandlerSpec` and
`PrefixHandlerSpec` relied on Groovy 3 _widening_ the shaded
`datadog.eclipse.jetty.server.Request` argument to the parent's
declared `HttpServletRequest` parameter type ; under Groovy 4
the metaclass **no longer performs that widening**, the lookup falls
through to `methodMissing`, raising a `MissingMethodException` when
executing `super.handle(target, baseRequest, request, response)` in
the `TestHttpServer.handle` method.
Annotating the three subclass `handle` overrides with
`@CompileStatic` forces Java-like static dispatch. The bytecode
emits `INVOKESPECIAL` against the parent's declared signature,
bypassing the runtime metaclass lookup entirely. `AllHandlerSpec`
is left untouched since its body uses dynamic Groovy idioms.
Gradle 9.5.1 raises TestKit's minimum supported Gradle
version above the old 3.5 fixture. Skip Gradle versions that
the current TestKit cannot run, so the smoke test does not fail
before CI Visibility assertions can run.
Also isolate nested launcher wrapper invocations with a temporary
GRADLE_USER_HOME. This prevents user or CI init scripts from
breaking older Gradle/Kotlin runtimes during wrapper setup.
Update legacy expected events to include the ITR tests-skipping
metadata emitted by the current tracer.
@bric3bric3 added type: bug fix Bug fix comp: tooling Build & Tooling tag: no release notes Changes to exclude from release notes tag: ai generated Largely based on code generated by an AI or LLM labels May 28, 2026 — with ChatGPT Codex Connector
This was referenced May 28, 2026
@datadog-official

This comment has been minimized.

@dd-octo-sts

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

SuiteStatus
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

Startup Time

ScenarioThis PRmasterChange
insecure-bank / iast14,013 ms14,025 ms-0.1%
insecure-bank / tracing12,821 ms12,957 ms-1.0%
petclinic / appsec16,614 ms16,381 ms+1.4%
petclinic / iast16,501 ms16,641 ms-0.8%
petclinic / profiling16,549 ms16,476 ms+0.4%
petclinic / tracing15,841 ms15,716 ms+0.8%

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

Copy link
Copy Markdown
ContributorAuthor

@codex review

@bric3bric3 changed the title Stabilize Gradle smoke tests for Gradle 9.5.1Allow Gradle smoke tests to run on Gradle 9.xMay 28, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@bric3
bric3 marked this pull request as ready for review May 28, 2026 13:51
@bric3
bric3 requested review from a team as code ownersMay 28, 2026 13:51
@bric3
bric3 added this pull request to the merge queueMay 28, 2026
@dd-octo-sts

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

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

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-05-28 13:54:35 UTC ℹ️ Start processing command /merge


2026-05-28 13:54:40 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-05-28 15:05:41 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 28, 2026
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854dBot merged commit d7affab into masterMay 28, 2026
590 of 599 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854dBot deleted the bdu/gradle9-gradle-smoke-tests branch May 28, 2026 15:05
@github-actionsgithub-actionsBot added this to the 1.63.0 milestone May 28, 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: bug fixBug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@bric3@daniel-mohedano