Skip to content

Convert Spring Boot 3 / quarkus / armeria / vertx to smoke-test plugin - #11421

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 8 commits into
masterfrom
bdu/smoke-test-pattern-f-drop-in
May 21, 2026
Merged

Convert Spring Boot 3 / quarkus / armeria / vertx to smoke-test plugin#11421
gh-worker-dd-mergequeue-cf854d[bot] merged 8 commits into
masterfrom
bdu/smoke-test-pattern-f-drop-in

Conversation

@bric3

@bric3bric3 commented May 19, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

Drop-in conversion of ten more nested-build smoke tests to the dd-trace-java.smoke-test-app plugin added in #11405. All ten previously shelled out to a gradlew via an Exec task — either the root build's (which might become incompatible with their plugin down the road).

Spring Boot 3 / Gradle nested build, root-gradlew Exec:

  • spring-boot-3.0-webflux
  • spring-boot-3.0-webmvc
  • spring-boot-3.3-webmvc
  • kafka-3

Non-Spring Gradle nested build, root-gradlew Exec:

  • quarkus (Quarkus 1.9.2 platform, Java 8 application)
  • armeria-grpc

Inner Gradle wrapper (committed) → Tooling API:

  • Removed gradle wrappers in vertx-3.4, vertx-3.9, vertx-3.9-resteasy, vertx-4.2; by convention the smoke-test-app plugin pins Gradle to 8.14.5, and uses Java 21.

Each outer build.gradle collapses to a small block

smokeTestApp { application { taskName
nestedTasks
artifactPath
sysProperty
}
projectJar(...)
}

Before the definition looked like:

tasks.register('bootJar', Exec) {
workingDir appDir
environment += [
"GRADLE_OPTS": "-Dorg.gradle.jvmargs='-Xmx512M'",
"JAVA_HOME": getLazyJavaHomeFor(17)
]
commandLine "$rootDir/${gradlewCommand}", "bootJar", "--no-daemon", "--max-workers=4", "-PappBuildDir=$appBuildDir"
outputs.cacheIf { true }
outputs.dir(appBuildDir)
.withPropertyName("applicationJar")
inputs.files(fileTree(appDir) {
include '**/*'
exclude '.gradle/**'
})
.withPropertyName("application")
.withPathSensitivity(PathSensitivity.RELATIVE)
group('build')
}

Each inner application/build.gradle targets explicitly :

  • Java 8 for quarkus and the vertx modules
  • Java 17 for the rest (testJvmConstraints required Java 17)
  • kafka-3 swaps its toolchain.languageVersion for sourceCompatibility to avoid pulling a separate JDK 17 toolchain on top of the daemon's JDK 21

Inner Gradle wrappers and shell script are removed.

Motivation

These are the remaining straightforward Gradle-based nested smoke tests after Patterns B / C / D / E (#11406, #11407, #11408, #11417). With this PR landed, the only nested-build smoke tests still on plain Exec are

  • the two GraalVM-native ones (quarkus-native, spring-boot-3.0-native)
  • and the two Maven ones (springboot-openliberty-{20,23}).

Both groups need different treatment.

Additional Notes

Contributor Checklist

🤖 Generated with Claude Code

bric3and others added 3 commits May 18, 2026 18:06
Adds a new included build `build-logic/` hosting a single subproject
`smoke-test` that exposes the `dd-trace-java.smoke-test-app` plugin.
The plugin contributes:
- `NestedGradleBuild` task type that runs a nested Gradle build via the
Gradle Tooling API. It pins the nested Gradle version (no committed
per-application wrappers), uses the configured Java toolchain for the
nested daemon, forwards artifact paths from the root build as
`-P<name>=<path>`, and redirects the nested `buildDir` via
`-PappBuildDir=<path>` so outputs land under the outer project's build
directory.
- `smokeTestApp` project extension with an `application { ... }` block
that registers the `NestedGradleBuild` task, wires it into every `Test`
task via `dependsOn` + a `jvmArgumentProvider` for the produced
artifact's system property. Consumers can also register
`NestedGradleBuild` directly when they need more control; the plugin
is a no-op until `application` or a manual registration is done.
- `projectJar(name, project)` helper that forwards a sibling project's
jar to the nested build through a resolvable `Configuration` (avoids
`evaluationDependsOn` and the cross-project access ordering issues).
The plugin is verified with JUnit 5 unit tests (`ProjectBuilder`) and
end-to-end tests that drive the Tooling API path through the Gradle Test
Kit with a temporary Kotlin-DSL test project.
`build-logic/settings.gradle.kts` references the existing
`gradle/libs.versions.toml` catalog (mirroring `buildSrc/`) so the
plugin can use the same library coordinates as the rest of the repo.
The Gradle libs Maven repository (`https://repo.gradle.org/gradle/libs-releases`,
scoped to `org.gradle:`) is added to the root build's `pluginManagement`
and to `gradle/repositories.gradle` so the Tooling API jar resolves.
Smoke-test modules with Spring Boot plugin versions incompatible with
Gradle 9 will use this plugin in follow-up PRs instead of a committed
Gradle 8 wrapper.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…14.5
Set conventions on `smokeTestApp`:
- `gradleVersion` defaults to `"8.14.5"` (Gradle 8 last release; pinned because
Spring Boot plugin pre-3.5 calls `Configuration.getUploadTaskName()`, removed
in Gradle 9).
- `javaLauncher` defaults to a JDK 21 toolchain (the version the root build
requires for its own Gradle 9 migration; standardising the nested daemon on
the same JDK avoids requiring an extra toolchain on dev machines and CI
runners).
Consumers that need a different JDK or Gradle version still override
explicitly. The inner build script is responsible for pinning the produced
bytecode level (`java { sourceCompatibility = JavaVersion.VERSION_1_8 }` or
similar) — Gradle adds `--release N` automatically when source/target differs
from the daemon JVM.
`JavaToolchainService` is now injected into the extension; this works in any
project where a `java*` (or related) plugin is applied. Smoke-test modules
already apply `gradle/java.gradle`, which applies `java`, so the convention
resolves on first read.
Public defaults exposed as `DEFAULT_NESTED_GRADLE_VERSION` and
`DEFAULT_NESTED_JAVA_VERSION` constants so the values are discoverable.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ugin
Switch the plugin sources and unit tests over to the typed
`org.gradle.kotlin.dsl` extension functions where they replace
`::class.java` boilerplate:
- `tasks.register(name, Type::class.java) { … }` → `tasks.register<Type>(name) { … }`
- `tasks.withType(Type::class.java).configureEach { … }` → `tasks.withType<Type>().configureEach { … }`
- `extensions.create("name", Type::class.java)` → `extensions.create<Type>("name")`
- `extensions.getByType(Type::class.java)` → `extensions.getByType<Type>()`
- `extensions.findByName("name")` (followed by `isInstanceOf`) → `extensions.findByType<Type>()`
- `project.plugins.apply(Plugin::class.java)` → `project.apply<Plugin>()` (PluginAware)
- `objects.newInstance(Type::class.java)` → `objects.newInstance<Type>()`
Also drop the six `captured*` local variables in `SmokeTestAppExtension.application` —
inside `tasks.register<NestedGradleBuild>(taskName) { … }` the outer extension's
properties are now reached via `this@SmokeTestAppExtension.<prop>` directly.
No behavioural change; the 9 plugin tests still pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@datadog-prod-us1-4

This comment has been minimized.

@bric3bric3 changed the title chore(smoke-tests): convert SB3 / quarkus / armeria / vertx to smoke-test pluginConvert Spring Boot 3 / quarkus / armeria / vertx to smoke-test pluginMay 19, 2026
@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 labels May 19, 2026
…test plugin
Drop-in conversion of ten more nested-build smoke tests to the
`dd-trace-java.smoke-test-app` plugin (added in #11405). All ten
previously used an `Exec` task that shelled out to a `gradlew` —
either the root build's (now Gradle 9, incompatible with their plugin
chain) or a committed inner wrapper.
Spring Boot 3 / Gradle nested build, root-gradlew Exec:
- `spring-boot-3.0-webflux`
- `spring-boot-3.0-webmvc`
- `spring-boot-3.3-webmvc`
- `kafka-3`
Non-Spring Gradle nested build, root-gradlew Exec:
- `quarkus` (Quarkus 1.9.2 platform, Java 8)
- `armeria-grpc`
Inner Gradle wrapper (committed) → Tooling API:
- `vertx-3.4`, `vertx-3.9`, `vertx-3.9-resteasy`, `vertx-4.2`
The committed inner `gradlew` / `gradlew.bat` / `gradle/wrapper/` files
are removed — the Tooling API pins the same Gradle 8.14.5 distribution
the wrappers used.
Each module's outer `build.gradle` collapses to a small
`smokeTestApp { application { taskName / nestedTasks / artifactPath /
sysProperty } projectJar(...) }` block. The daemon Gradle version + JDK 21
toolchain come from the plugin's conventions.
Each inner `application/build.gradle` pins `sourceCompatibility`
explicitly so JDK 21's javac cross-compiles to the right bytecode level
(`--release`): Java 8 for `quarkus` and the vertx modules, Java 17 for
the rest. `kafka-3` swaps its `toolchain.languageVersion` for
`sourceCompatibility` to avoid pulling a separate JDK 17 toolchain on
top of the daemon's JDK 21.
Verified locally on Gradle 9.5.1: all ten nested builds produce their
expected artifact; representative smoke tests
(`spring-boot-3.0-webmvc`, `kafka-3`, `vertx-3.9`) pass with
`-PskipFlakyTests=true`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bric3
bric3force-pushed the bdu/smoke-test-pattern-f-drop-in branch from 0f40797 to 8accae8CompareMay 19, 2026 20:01
Base automatically changed from bdu/smoke-test-plugin-infrastructure to masterMay 19, 2026 20:48
bric3and others added 2 commits May 20, 2026 14:51
Match the review feedback applied on #11408: expand the terse comments
on the nested settings.gradle files to explain the CI Maven mirror
proxies and the CI-only shared build cache (f6ec1f5 / #982,
b34ccbc), plus the Quarkus plugin version property forwarding.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bric3
bric3 marked this pull request as ready for review May 21, 2026 10:10
@bric3
bric3 requested review from a team as code ownersMay 21, 2026 10:10
@bric3
bric3 requested review from ygree and removed request for a teamMay 21, 2026 10:10

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:7a18d95a53

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

Comment threaddd-smoke-tests/quarkus/build.gradle Outdated
@bric3bric3 mentioned this pull request May 21, 2026
19 tasks
The previous commit removed the explicit `javaLauncher` thinking it was
unnecessary, but Quarkus 1.9.2 (Sep 2020) cannot run on JDK 21. With the
launcher removed, the smoke-test plugin defaulted to JDK 21 and the
Quarkus app process exited before opening its port, causing 8
initialization errors in QuarkusJBossLoggingSmokeTest /
QuarkusSlf4jSmokeTest.
Restore the launcher pinned to JDK 11 — within Quarkus 1.x's supported
JDK range (8 / 11).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bric3bric3 mentioned this pull request May 21, 2026
@bric3
bric3 added this pull request to the merge queueMay 21, 2026
@dd-octo-sts

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

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

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-05-21 13:42:28 UTC ℹ️ Start processing command /merge


2026-05-21 13:42:33 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-05-21 14:56:17 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 21, 2026

@sarahchen6sarahchen6 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.

(late but) nice cleanup 💯

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854dBot merged commit 7270bfd into masterMay 21, 2026
570 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854dBot deleted the bdu/smoke-test-pattern-f-drop-in branch May 21, 2026 14:56
@github-actionsgithub-actionsBot added this to the 1.63.0 milestone 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 notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@bric3@sarahchen6@AlexeyKuznetsov-DD