Skip to content

Reduce Gradle cache writers and converge on Develocity - #556

Merged
laurit merged 1 commit into
open-telemetry:mainfrom
trask:trask-reduce-gradle-cache-writers
Aug 18, 2026
Merged

Reduce Gradle cache writers and converge on Develocity#556
laurit merged 1 commit into
open-telemetry:mainfrom
trask:trask-reduce-gradle-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 lite review requested due to automatic review settings August 14, 2026 03:16

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 updates Gradle/Develocity configuration and GitHub Actions workflows to reduce Gradle GitHub cache writes by making most jobs cache read-only, while keeping a small set of trusted default-branch jobs as the only cache writers and aligning behavior with Develocity population goals.

Changes:

  • Disable Gradle local build cache on authenticated main CI builds so executed tasks can populate Develocity, while keeping remote cache push enabled when the Develocity access key is present.
  • Make multiple workflows and jobs use gradle/actions/setup-gradle in cache-read-only mode (release, CodeQL, semconv auto-update, and most matrix legs).
  • In the reusable build workflow, restrict GitHub cache writes to one job per OS on the default branch and exclude caches/build-cache-1 from the Gradle User Home snapshot for those writer jobs.

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 Adds Develocity/Gradle build cache toggles to disable local cache on authenticated main CI and centralizes remote push enablement logic.
.github/workflows/release.yml Forces release-related Gradle cache usage to be read-only (both reusable build and direct Gradle setup steps).
.github/workflows/codeql.yml Makes CodeQL’s Gradle setup read-only to avoid GitHub cache writes.
.github/workflows/build-common.yml Implements the “three trusted writers” strategy and Gradle home cache excludes for the writer jobs.
.github/workflows/auto-update-semconv.yml Makes the semconv auto-update workflow’s Gradle setup read-only.

💡 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-common.yml
@trask
trask marked this pull request as ready for review August 17, 2026 17:41
@trask
trask requested review from a team as code owners August 17, 2026 17:41
@laurit
laurit merged commit 7e3d002 into open-telemetry:main Aug 18, 2026
17 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