Skip to content

Apply Java convention from remaining projects - #12331

Open
bric3 wants to merge 3 commits into
masterfrom
refactor/apply-java-convention-remaining-projects
Open

Apply Java convention from remaining projects#12331
bric3 wants to merge 3 commits into
masterfrom
refactor/apply-java-convention-remaining-projects

Conversation

@bric3

@bric3 bric3 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

Apply dd-trace-java.conventions.java from the remaining projects that directly applied gradle/java.gradle.

Make the Java and Shadow plugins explicit in the benchmark integration child projects, and update the Spotless guard so direct Java script applications are forbidden everywhere.

Motivation

Continue the incremental APMLP-610 script-plugin migration through project-facing convention plugins.

See #12258.

Additional Notes

The Java convention still delegates to gradle/java.gradle; moving that implementation into build logic remains separate follow-up work. dd-java-agent retains a publish-only Spotless exception because migrating gradle/publish.gradle is outside this change.

Contributor Checklist

bric3 added 3 commits August 25, 2026 14:19
Keep shared Kotlin and default Groovy test wiring behind plugin callbacks.
Cover JVM test suites and test fixtures through Gradle source-set APIs.
@bric3 bric3 added tag: no release notes Changes to exclude from release notes type: refactoring comp: tooling Build & Tooling tag: ai generated Largely based on code generated by an AI or LLM labels Aug 28, 2026
@datadog-prod-us1-5

datadog-prod-us1-5 Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 58.78% (-0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 65c0c56 | Docs | View more details | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Aug 28, 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.87 s 14.86 s [-0.9%; +1.0%] (no difference)
startup:insecure-bank:tracing:Agent 13.58 s 13.83 s [-2.5%; -1.0%] (significantly better)
startup:petclinic:appsec:Agent 17.55 s 17.36 s [+0.3%; +1.9%] (maybe worse)
startup:petclinic:iast:Agent 17.60 s 17.61 s [-0.9%; +0.8%] (no difference)
startup:petclinic:profiling:Agent 17.49 s 17.48 s [-1.2%; +1.4%] (no difference)
startup:petclinic:sca:Agent 17.41 s 17.28 s [-0.3%; +1.7%] (no difference)
startup:petclinic:tracing:Agent 16.58 s 16.78 s [-2.2%; -0.1%] (maybe better)

Commit: 65c0c563 · 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 force-pushed the refactor/apply-java-convention-remaining-projects branch from b424a9d to 65c0c56 Compare August 28, 2026 12:48
@bric3
bric3 changed the base branch from master to refactor/migrate-kotlin-test-convention August 28, 2026 12:48

plugins {
id 'com.gradleup.shadow'
id 'dd-trace-java.conventions.java'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

note: The java convention for this module might be too large, but this follows what's existing today.

In the future, a proper convention should be created dd-trace-java.module.distributable.agent for agent jar, this might help to have multiple kind of agent jar distribution (modularization).

The following aspects appears to be needed

  • java-base
  • java-compilation (to support Java 6 (Pre Java 8) graceful degradation)
  • archives / Shadow behavior
  • javadoc
  • code-quality
  • testing
  • publishing and dependency locking

Some other "features" may not be needed.

@bric3
bric3 marked this pull request as ready for review August 28, 2026 13:04
@bric3
bric3 requested a review from a team as a code owner August 28, 2026 13:04
@bric3
bric3 requested review from sarahchen6 and removed request for a team August 28, 2026 13:04
Base automatically changed from refactor/migrate-kotlin-test-convention to master August 28, 2026 14:38

@datadog-prod-us1-5 datadog-prod-us1-5 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.

Datadog Autotest: PASS

More details

The convention plugins preserve the prior Java, Kotlin, Groovy, test suite, and test fixture setup. The Spotless exception stays limited to the publish script in dd-java-agent.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit 65c0c56 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

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.

1 participant