Make index tasks cacheable and improve input fingerprinting#11896
Open
bric3 wants to merge 2 commits into
Open
Make index tasks cacheable and improve input fingerprinting#11896bric3 wants to merge 2 commits into
bric3 wants to merge 2 commits into
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".
Contributor
🟢 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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]