Reduce Gradle cache writers and converge the remote cache - #1247
Merged
jaydeluca merged 1 commit intoAug 14, 2026
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adjusts Gradle caching and Develocity remote build cache configuration to reduce GitHub Actions cache churn and ensure the remote cache converges reliably, while limiting which CI runs can write caches.
Changes:
- Configure Gradle build cache to use
remote(develocity.buildCache)and disable local build cache on the authenticated main-branch CI writer to improve remote cache convergence. - Make additional GitHub Actions workflows use Gradle setup caches in read-only mode to reduce cache writers.
- Restrict
DEVELOCITY_ACCESS_KEYexposure in CI to narrow when authenticated remote-cache writes can occur.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
settings.gradle.kts |
Switches remote build cache configuration to Develocity’s build cache and conditionally disables local build cache for the authenticated main CI writer. |
.github/workflows/build.yml |
Tightens cache writer conditions and scopes Develocity access key usage to specific matrix/branch conditions. |
.github/workflows/codeql.yml |
Makes Gradle setup cache read-only for CodeQL and removes Develocity key usage from the build step. |
.github/workflows/oats-tests.yml |
Forces Gradle setup cache to read-only mode. |
.github/workflows/prometheus-test.yml |
Forces Gradle setup cache to read-only mode. |
Suppressed comments (1)
.github/workflows/build.yml:48
- The workflow currently injects
DEVELOCITY_ACCESS_KEYforworkflow_dispatchruns on the default branch (because the condition only checksref_name). That enables authenticated Develocity remote-cache writes even though this PR’s intent/description says workflow dispatches should be explicitly read-only. Gate the key injection ongithub.event_name == 'push'so only default-branch pushes can write to the remote cache.
run: ./gradlew clean check shadowJar
env:
DEVELOCITY_ACCESS_KEY: >-
${{ matrix.os == 'ubuntu-latest' && github.ref_name == github.event.repository.default_branch && secrets.DEVELOCITY_ACCESS_KEY || '' }}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
trask
marked this pull request as ready for review
August 14, 2026 16:17
jaydeluca
approved these changes
Aug 14, 2026
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.
Applies the cache fixes from opentelemetry-java-instrumentation#19532 and opentelemetry-java-instrumentation#19533 to reduce GitHub Actions cache pressure and improve Develocity remote cache coverage.