Make index tasks cacheable and improve input fingerprinting - #11896
Conversation
Also, it improves the way gradle fingerprints the input The class path is already declared as an input if the JavaExec spec, and doesn't need an additinal declaration. The included dir is `dd-java-agent/build/generated/included` we don't really care about `included/` or where it is, but the task cares about what's below, like `inst/foo/Bar.classdata`. So the idea is to tell gradle to apply that normalization for fingerprinting. https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/PathSensitivity.html#RELATIVE Additional note, that in CI the build dir of projects is relocated under ``` ..../workspace/dd-java-agent/build ```
The class path is already declared as an input if the JavaExec spec, and doesn't need an additinal declaration.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f46f26b0f9
ℹ️ 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".
🟢 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. |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
461d3e8
into
master
What Does This Do
This PR makes the
instrumentation indexandagentJarIndexbuild tasks cacheable. Additionally, it improves how Gradle fingerprints task inputs for consistency and better cache normalization.Motivation
Enabling task caching improves build performance by reusing outputs from previous executions. Adjusting input fingerprint normalization ensures accurate task caching behavior under different build environments.
Note
JavaExecis disabled for caching by default because Gradle needs task-specific input/output information. These index generators are deterministic for the same inputs, so declaring the missing metadata and enablingTaskOutputs.cacheIflets Gradle restore their generated index files from the build cache instead of rerunning them.Additional Notes
instrumentation indextask no longer declares redundant input for the class path, as it is already specified in theJavaExecspecification.agentJarIndextask now usesPathSensitivity.RELATIVEfor the expanded file tree.for input fingerprinting, focusing on relevant files below specific directories and improving CI build behavior.
Related to
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 issue/merge. You can also:/merge --commit-message "..."/merge -c/merge -f --reason "reason"; please use this judiciously, as some checks do not run at the PR-level (note: the PR still needs to be mergeable, this will only skip the pre-merge build)Jira ticket: [PROJ-IDENT]