Skip to content

Reduce Gradle cache writers and converge the remote cache - #1247

Merged
jaydeluca merged 1 commit into
open-telemetry:mainfrom
trask:trask-reduce-actions-cache-writers
Aug 14, 2026
Merged

Reduce Gradle cache writers and converge the remote cache#1247
jaydeluca merged 1 commit into
open-telemetry:mainfrom
trask:trask-reduce-actions-cache-writers

Conversation

@trask

@trask trask commented Aug 14, 2026

Copy link
Copy Markdown
Member

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.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI 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.

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_KEY exposure 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_KEY for workflow_dispatch runs on the default branch (because the condition only checks ref_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 on github.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.

Comment thread .github/workflows/build.yml
@trask
trask marked this pull request as ready for review August 14, 2026 16:17
@trask
trask requested review from a team as code owners August 14, 2026 16:17
@jaydeluca
jaydeluca merged commit 3c2b1ce into open-telemetry:main Aug 14, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants