From 11b2e851fa19bc0e1f9e0c27467d60dbff6686c7 Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Tue, 29 Sep 2026 20:47:23 +0000 Subject: [PATCH] ci: stop caching the configuration cache across runners (#7454) --- .github/actions/gradle-setup/action.yml | 32 +------------------------ .github/workflows/protobufs-bump.yml | 1 - .github/workflows/reusable-check.yml | 23 ------------------ .github/workflows/scheduled-updates.yml | 1 - 4 files changed, 1 insertion(+), 56 deletions(-) diff --git a/.github/actions/gradle-setup/action.yml b/.github/actions/gradle-setup/action.yml index 7a36394b7c..8957a6d5d3 100644 --- a/.github/actions/gradle-setup/action.yml +++ b/.github/actions/gradle-setup/action.yml @@ -33,20 +33,8 @@ inputs: dependency_graph: description: | Dependency graph mode: disabled | generate | generate-and-submit | generate-and-upload | - download-and-submit. Submit needs `contents: write`. Never combine with - cache_configuration_cache — a CC-hit build generates NO graph. + download-and-submit. Submit needs `contents: write`. default: 'disabled' - cache_configuration_cache: - description: | - Persist .gradle/configuration-cache. Opt-in: only pays off when config inputs are - commit-stable (the VERSION_CODE-pinned jobs). Real-versionCode jobs would restore, - miss, and never re-save. - default: 'false' - cache_key_suffix: - description: | - Extra CC-key discriminator for matrix legs running different task graphs (test-shards). - Runner-only matrices don't need it — os/arch are already in the key. - default: '' runs: using: composite steps: @@ -172,21 +160,3 @@ runs: # cache latency turns out to cost more than the restore it replaced. gradle-home-cache-excludes: | caches/build-cache-1 - - # CC entries live in the project dir; setup-gradle only caches the Gradle User Home — - # Develocity measured 100% CC miss (~52s config/build) before this. Runs after Setup - # Gradle so GRADLE_ENCRYPTION_KEY is exported. No sha in the key: unchanged build files - # hit exactly and skip the save; restore-keys is the self-heal for stale entries. - # The wrapper hash is its own restore-key segment: a stale same-version entry is a - # graceful CC miss, but an entry written by a DIFFERENT Gradle version can crash - # fingerprint deserialization outright (seen on 9.6.1 entries under 9.7.0). - - name: Cache Gradle configuration-cache - # Gates: opted in; key present (undecryptable otherwise — keeps keyless fork PRs off - # these entries); not merge_group (throwaway cache scope). - if: inputs.cache_configuration_cache == 'true' && inputs.gradle_encryption_key != '' && github.event_name != 'merge_group' - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6 - with: - path: ${{ github.workspace }}/.gradle/configuration-cache - key: gradle-cc-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}${{ inputs.cache_key_suffix && format('-{0}', inputs.cache_key_suffix) || '' }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('settings.gradle.kts', '**/build.gradle.kts', 'build-logic/**', 'gradle/*.gradle', 'gradle/libs.versions.toml', 'gradle.properties', 'config.properties', '.github/ci-gradle.properties') }} - restore-keys: | - gradle-cc-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}${{ inputs.cache_key_suffix && format('-{0}', inputs.cache_key_suffix) || '' }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}- diff --git a/.github/workflows/protobufs-bump.yml b/.github/workflows/protobufs-bump.yml index 4ab34ec8b4..d930eab07c 100644 --- a/.github/workflows/protobufs-bump.yml +++ b/.github/workflows/protobufs-bump.yml @@ -59,7 +59,6 @@ jobs: develocity_access_key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} job_summary_pr_comment: 'never' cache_read_only: 'true' - cache_configuration_cache: 'false' cache_robolectric: 'false' # The sync is run to see what it would change; the result is not committed here. diff --git a/.github/workflows/reusable-check.yml b/.github/workflows/reusable-check.yml index 38afcd68ef..f0ededb179 100644 --- a/.github/workflows/reusable-check.yml +++ b/.github/workflows/reusable-check.yml @@ -96,13 +96,6 @@ jobs: develocity_access_key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} job_summary_pr_comment: ${{ env.GRADLE_PR_COMMENT }} cache_read_only: ${{ env.GRADLE_CACHE_READ_ONLY }} - # Disabled on Gradle 9.7.1: restoring an entry written by another runner crashes - # fingerprint deserialization (IsInIdeaSyncValueSource CNFE, settings-plugin - # classloader scope) and the job dies in ~10s before any test. A cross-machine - # restore is the only thing that triggers it, so it is 100% red in CI and not - # reproducible from a local store/reuse pair. Re-enable when that is fixed - # upstream; VERSION_CODE is still pinned above so entries would reuse. - cache_configuration_cache: 'false' - name: Spotless, Detekt & Android Lint # The root spotlessCheck and detekt do not reach the included build-logic build. @@ -134,13 +127,6 @@ jobs: develocity_access_key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} job_summary_pr_comment: ${{ env.GRADLE_PR_COMMENT }} cache_read_only: ${{ env.GRADLE_CACHE_READ_ONLY }} - # Disabled on Gradle 9.7.1: restoring an entry written by another runner crashes - # fingerprint deserialization (IsInIdeaSyncValueSource CNFE, settings-plugin - # classloader scope) and the job dies in ~10s before any test. A cross-machine - # restore is the only thing that triggers it, so it is 100% red in CI and not - # reproducible from a local store/reuse pair. Re-enable when that is fixed - # upstream; VERSION_CODE is still pinned above so entries would reuse. - cache_configuration_cache: 'false' - name: Screenshot Test Validation # -Dorg.gradle.isolated-projects=false: AGP's screenshot plugin iterates BuildServicesRegistry at @@ -312,15 +298,6 @@ jobs: develocity_access_key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} job_summary_pr_comment: ${{ env.GRADLE_PR_COMMENT }} cache_read_only: ${{ env.GRADLE_CACHE_READ_ONLY }} - # Disabled on Gradle 9.7.1: restoring an entry written by another runner crashes - # fingerprint deserialization (IsInIdeaSyncValueSource CNFE, settings-plugin - # classloader scope) and the job dies in ~10s before any test. A cross-machine - # restore is the only thing that triggers it, so it is 100% red in CI and not - # reproducible from a local store/reuse pair. Re-enable when that is fixed - # upstream; VERSION_CODE is still pinned above so entries would reuse. - cache_configuration_cache: 'false' - # Shards run different task graphs; kover flips the graph again. - cache_key_suffix: ${{ matrix.shard.name }}${{ inputs.run_coverage && '-kover' || '' }} cache_konan: 'true' - name: Run Tests & Coverage (${{ matrix.shard.name }}) diff --git a/.github/workflows/scheduled-updates.yml b/.github/workflows/scheduled-updates.yml index e377bdb6f5..c18680b0d3 100644 --- a/.github/workflows/scheduled-updates.yml +++ b/.github/workflows/scheduled-updates.yml @@ -124,7 +124,6 @@ jobs: develocity_access_key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} job_summary_pr_comment: 'never' cache_read_only: 'true' - cache_configuration_cache: 'false' cache_robolectric: 'false' - name: Regenerate the schema strings