Skip to content

Conversation

@jbachorik
Copy link
Collaborator

@jbachorik jbachorik commented Feb 11, 2026

What does this PR do?:

Upgrades the build system from Gradle 8.12 to Gradle 9.3.1 and updates the build JDK requirement from JDK 11 to JDK 21. Also adds Dependabot configuration for automated dependency updates.

Key changes:

  • Gradle 8.12 → 9.3.1
  • Spotless plugin 6.x → 7.0.2
  • JMH plugin 0.7.2 → 0.7.3
  • CI and Docker builds now use JDK 21 (Gradle 9 requires JDK 17+)
  • Fix Kotlin 2.2 API changes (capitalize, createTempFile, exec)
  • Fix Spotless 7.x API changes (editorConfigOverride, leadingTabsToSpaces)
  • Two-JDK pattern: build with JDK 21, test with configurable JDK
  • Migrate Test/JavaExec tasks to Exec tasks to bypass Gradle 9 toolchain compatibility issues on musl systems
  • Fix Exec task JDK resolution: defer executable lookup to execution time so JAVA_TEST_HOME is read correctly
  • Fix Exec task environment: explicitly pass through CI environment variables (LIBC, TEST_COMMIT, etc.)
  • Test filtering now uses -Ptests property instead of --tests flag (Exec tasks don't support --tests)
  • Add Dependabot for Gradle and GitHub Actions dependency updates

Motivation:

Gradle 9 brings performance improvements, better dependency management, and is required for long-term support. JDK 21 is the current LTS and provides the best tooling support while still allowing --release 8 targeting.

Additional Notes:

  • The compiled bytecode still targets Java 8 runtime (unchanged)
  • JDK 21+ emits deprecation warnings for --release 8; suppressed with -Xlint:-options
  • Build JDK configuration documented in AGENTS.md for future reference
  • Config-specific test tasks (testdebug, testrelease) use Exec task type to bypass Gradle's toolchain system, which has musl compatibility issues
  • Exec tasks differ from Test tasks: executable and environment must be resolved at execution time, not configuration time
  • Dependabot will create weekly PRs for Gradle and GitHub Actions updates

How to test the change?:

  1. Run gradle build - should complete successfully
  2. Run gradle spotlessCheck - formatting checks pass
  3. Run gradle test with -Ptests filter - test filtering works
  4. Run with JAVA_TEST_HOME set - multi-JDK testing works
  5. Run utils/run-docker-tests.sh --libc=musl --jdk=21 - Docker tests work on musl (Alpine)
  6. CI pipeline should pass with correct JDK versions for each test matrix combination

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles
    credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.
  • JIRA: [JIRA-XXXX]

Unsure? Have a question? Request a review!

🤖 Generated with Claude Code

- Gradle 8.12 → 9.3.1, Spotless 7.0.2, JMH 0.7.3
- CI and Docker builds now use JDK 21 (Gradle 9 requires JDK 17+)
- Fix Kotlin 2 API changes (capitalize, createTempFile, exec)
- Fix Spotless 7.x API changes (editorConfigOverride, leadingTabsToSpaces)
- Two-JDK pattern: build JDK 21, test JDK configurable

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jbachorik jbachorik added the AI label Feb 11, 2026
@dd-octo-sts
Copy link

dd-octo-sts bot commented Feb 11, 2026

CI Test Results

Run: #21947336544 | Commit: 04028e4 | Duration: 19m 41s (longest job)

5 of 40 test jobs failed

Status Overview

JDK glibc-aarch64/debug glibc-amd64/debug musl-aarch64/debug musl-amd64/debug
8 - - -
8-ibm - - -
8-j9 - -
8-librca - -
8-orcl - - -
8-zing - -
11 - - -
11-j9 - -
11-librca - -
11-zing - -
17 - -
17-graal - -
17-j9 - -
17-librca - -
17-zing - -
21 - -
21-graal - -
21-librca - -
21-zing - -
25 - -
25-graal - -
25-librca - -

Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled

Failed Tests

musl-amd64/debug / 8-librca

Job: View logs

No detailed failure information available. Check the job logs.

musl-amd64/debug / 11-librca

Job: View logs

No detailed failure information available. Check the job logs.

musl-aarch64/debug / 11-librca

Job: View logs

No detailed failure information available. Check the job logs.

musl-aarch64/debug / 8-librca

Job: View logs

No detailed failure information available. Check the job logs.

glibc-aarch64/debug / 21

Job: View logs

No detailed failure information available. Check the job logs.

Summary: Total: 40 | Passed: 35 | Failed: 5


Updated: 2026-02-12 13:14:23 UTC

@dd-octo-sts
Copy link

dd-octo-sts bot commented Feb 11, 2026

Scan-Build Report

User:runner@runnervmwffz4
Working Directory:/home/runner/work/java-profiler/java-profiler/ddprof-lib/src/test/make
Command Line:make -j4 all
Clang Version:Ubuntu clang version 18.1.3 (1ubuntu1)
Date:Thu Feb 12 14:57:46 2026

Bug Summary

Bug TypeQuantityDisplay?
All Bugs1
Unused code
Dead assignment1

Reports

Bug Group Bug Type ▾ File Function/Method Line Path Length
Unused codeDead assignmentlibraryPatcher_linux.cpppatch_library_unlocked941

jbachorik and others added 3 commits February 11, 2026 14:17
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Set explicit executable for runUnwindingValidator and unwindingReport
tasks to avoid Gradle 9 javaLauncher toolchain probing failures.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Gradle 9 detects that compileJava9Java uses mainSourceSet.output
which includes copyExternalLibs destination. Add explicit dependency.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix PATH env variable escaping in Dockerfile heredocs
- Add coreutils to Alpine base image for chmod

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@pr-commenter
Copy link

pr-commenter bot commented Feb 11, 2026

Integration Tests

All 30 integration tests passed

📊 Dashboard · 👷 Pipeline · 📦 f46d282f

jbachorik and others added 3 commits February 11, 2026 17:16
- Add 'assembled' publication with all build artifacts
- Include POM metadata (license, SCM, developers)
- Configure signing with in-memory PGP keys
- Add publication assertions for CI requirements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add javaLauncher workaround for Test tasks (musl compatibility)
- Fix configurations to be resolvable-only (Gradle 9 requirement)
- Upgrade plugins: ben-manes.versions 0.51.0, download 5.6.0
- Use lazy configuration for Javadoc tasks
- Fix eager task resolution in publishing assertions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Use lazy task resolution for javadocJar (map instead of get)
- Use task matching for assembleReleaseJar (registered in afterEvaluate)
- Extract javaLauncher workaround to documented helper methods

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
jbachorik and others added 5 commits February 12, 2026 12:18
Replace Test/JavaExec tasks with Exec tasks to bypass Gradle's
toolchain system. Adds JUnit Platform Console Launcher dependency.

- Same task names on all platforms (testdebug, testrelease)
- JAVA_TEST_HOME support everywhere for multi-JDK testing
- No platform-specific code paths
- Verified working in musl containers

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Preserve build-script args in doFirst blocks (LIFO order)
- Fix test filter to only use --select-method for '#' separator
- Update javadoc to reference Exec tasks instead of Test/JavaExec
- Simplify build.gradle.kts to use doFirst (plugin preserves args)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Move test properties into plugin (avoid doFirst ordering issues)
- Fix test filter: use --select-class instead of --scan-classpath when filtering
- Simplify build.gradle.kts (plugin now handles all properties)
- Tests now execute successfully with -Ptests filter

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Two critical fixes for Exec-based test tasks:

1. Defer executable resolution to execution time
   - Move testJavaExecutable() call from configuration to doFirst
   - CI sets JAVA_TEST_HOME at runtime, not visible at config time
   - Fixes JDK version mismatch (tests ran with build JDK not test JDK)

2. Explicitly pass through CI environment variables
   - Exec tasks don't inherit environment like Test tasks
   - Add LIBC, KEEP_JFRS, TEST_COMMIT, TEST_CONFIGURATION, SANITIZER
   - Fixes assumption failures in MuslDetectionTest and others

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant