Skip to content

fix(build): register Java formatting lazily and update formatter [PROF-16537] - #955

Merged
kaahos merged 6 commits into
mainfrom
paul.fournillon/fix-prof-16537-spotless
Nov 10, 2026
Merged

kaahos merged 6 commits into
mainfrom
paul.fournillon/fix-prof-16537-spotless

Conversation

@kaahos

@kaahos kaahos commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?:
Register Java formatting when the Java plugin is applied, in either plugin order. Pin Google Java Format to 1.30.0 without changing the Java 8 compilation target. Include functional regressions, CI wiring and build documentation.

Motivation:
PROF-16537: the early plugin check can silently omit Java formatting tasks. Enabling those tasks exposes incompatibilities between the old 1.7 formatter and the configured Spotless/build JVMs.

Additional Notes:

How to test the change?:
Use a build JDK of 21 or newer. Run from the repository root:

bash utils/tests/test_build_logic_ci.sh
./.claude/commands/build-and-summarize -p build-logic :conventions:test --max-workers=2 --no-build-cache --no-daemon --no-watch-fs
  • Functional tests cover both plugin orders, rejection through direct/aggregate/lifecycle checks, and an apply/check/compile round trip with Java 8 class-file version 52.
  • The workflow contract test checks the independent job, JDK, action-pin consistency, failure artifacts, exact command arguments and exit-status propagation.
  • These checks validate the build conventions, not the full profiler runtime.

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 security review (run the dd:platform-security-review
    skill, or file a request via the PSEC review form).
    bewaire also runs automatically on every PR.
  • This PR doesn't touch any of that.
  • JIRA: PROF-16537

Unsure? Have a question? Request a review!

@dd-octo-sts

dd-octo-sts Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

CI Test Results

Run: #43441905460 | Commit: e8c3dfb | Duration: 0s (longest job)

✅ All 0 test jobs passed

No CI outcome reports were found for this run.
Summary: Total: 0 | Passed: 0 | Failed: 0


Updated: 2026-11-13 14:22:30 UTC

@dd-octo-sts

dd-octo-sts Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Scan-Build Report

User:runner@runnervmwuk1x
Working Directory:/home/runner/work/java-profiler/java-profiler/ddprof-lib/src/test/make
Command Line:make -j4 all
Clang Version:Ubuntu clang version 21.1.8 (6ubuntu1)
Date:Tue Nov 10 15:30:20 2026

Bug Summary

Bug TypeQuantityDisplay?
All Bugs2
Logic error
Dereference of null pointer1
Unused code
Dead initialization1

Filter Results by File

Reports

Bug Group Bug Type ▾ File Function/Method Line Path Length
Unused codeDead initializationreferenceChains.cppapplyOomRamp4971
Logic errorDereference of null pointerperfEvents_linux.cppunregisterThread72026

@dd-octo-sts

dd-octo-sts Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

✅ All 40 integration tests passed

📊 Dashboard · 👷 Pipeline · 📦 30efcc02

@datadog-official

This comment has been minimized.

@kaahos

kaahos commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T14:19:18.181479Z 98bc82c Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 0378e234f5

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

@kaahos
kaahos added this pull request to stack #966 November 10, 2026 09:15
@kaahos
kaahos force-pushed the paul.fournillon/fix-prof-16537-spotless branch from 66a2387 to 98bc82c Compare November 10, 2026 13:36
@kaahos
kaahos marked this pull request as ready for review November 10, 2026 14:17
@kaahos
kaahos requested a review from a team as a code owner November 10, 2026 14:17

@datadog-official datadog-official Bot 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.

Bits Code Review: PASS

More details

No actionable defect was identified in plugin-order handling or CI wiring. Gradle/TestKit execution remains unverified because the required distribution and dependencies were not cached.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 98bc82c

@kaahos
kaahos force-pushed the paul.fournillon/fix-prof-16537-spotless branch from 86ebc3b to 30efcc0 Compare November 10, 2026 15:23
@kaahos

kaahos commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-11-10 16:47:16 UTC ℹ️ Start processing command /merge


2026-11-10 16:47:20 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in main is approximately 53m (p90).


2026-11-10 17:17:10 UTC ❌ MergeQueue: The checks failed on this merge request

Tests failed on this commit 408b518:

What to do next?

  • Investigate the failures and when ready, re-add your pull request to the queue!
  • If your PR checks are green, try to rebase/merge. It might be because the CI run is a bit old.
  • Any question, go check the FAQ.

@kaahos
kaahos merged commit e8c3dfb into main Nov 10, 2026
74 of 90 checks passed
@kaahos
kaahos deleted the paul.fournillon/fix-prof-16537-spotless branch November 10, 2026 17:17
@github-actions github-actions Bot added this to the 1.53.0 milestone Nov 10, 2026
kaahos added a commit that referenced this pull request Nov 11, 2026
Carry the exact SpotlessConventionPlugin content from upstream #955 (e8c3dfb): register Java formatting lazily and use GJF 1.30.0. The stacked #663 base predates that fix; no local formatter variant or formatter-only TestKit is included.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants