Collect Gradle daemon diagnostics on failures - #12110
Conversation
Bits found no code fix to applyWarning This comment is related to an earlier commit. 🟢 Investigated · ⚪ No code fix needed
View in Datadog | Reviewed commit 27ec1ac · Any feedback? Reach out in #deveng-pr-agent |
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
/datadog autotest review |
There was a problem hiding this comment.
More details
The added failure path preserves the original Gradle failure while best-effort diagnostics remain isolated behind their own exception handling. No diff-only behavioral regression was identified; the smoke test itself could not be executed because the repository requires Java 25 and this sandbox provides Java 21.
🤖 Datadog Autotest · Commit 3d7789b · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
This comment has been minimized.
This comment has been minimized.
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
There was a problem hiding this comment.
The new diagnostics directory is initialized during class loading from datadog.smoketest.builddir. Running the same Paths.get construction without that Gradle-injected property throws NullPointerException, so direct IDE/JUnit execution now fails before any test runs; the existing Gradle task supplies the property, but the new static initialization makes that invocation dependency unconditional.
📊 Validated against 5 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit 3d7789b · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3d7789baaf
ℹ️ 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".
There was a problem hiding this comment.
LGTM
I wonder as an improvement if it's useful to capture / interpret cgroup v1 (in the eventuality smoke test are moved outside the microVM)
Alos, I believe we could improve this in a follow-up to capture cgroup-v2 snapshots before/after each nested build? In our microVM/Kubernetes CI, these counters cover the build container hierarchy and accumulate across many Gradle processes.
Capturing the delta in general, e.g. with memory.max and memory.high, would help found some evidence about what's happening.
I believe there's another thing to handle in this improvement, the oom_kill counter in the memory.events file is cumulative, so capturing its value before the nested build starts, could also help pin point the issue. Likewise with the max value (count of rejected process creation attempts) in pid.events file.
What Does This Do
build/reportsdirectory./procinformation.Additional context gathering, such as heap and thread dumps, or global debug logging, is deferred for a future PR if needed.
Motivation
We have seen some Gradle smoke test scenarios failing after the nested build reported
BUILD SUCCESSFUL. TestKit then reported that the daemon had disappeared.The existing artifacts contained the daemon log but did not show whether the daemon had crashed, been killed, or remained alive after a connection failure. The TestKit directory was also deleted during cleanup.
These diagnostics provide additional evidence to investigate these failure modes if the issue happens again.
Additional Notes
test-environment-trigger: skip
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: APMLP-1630