From f29f5a9d7b09a7c6b29859002d29d24e1674c884 Mon Sep 17 00:00:00 2001 From: Daz DeBoer Date: Wed, 28 Jan 2026 11:03:09 -0700 Subject: [PATCH] Attempt to fix flaky caching tests (#836) --- .github/workflows/integ-test-cache-cleanup.yml | 5 +++++ .../integ-test-restore-containerized-gradle-home.yml | 1 + .github/workflows/integ-test-restore-custom-gradle-home.yml | 1 + .github/workflows/integ-test-restore-java-toolchain.yml | 1 + 4 files changed, 8 insertions(+) diff --git a/.github/workflows/integ-test-cache-cleanup.yml b/.github/workflows/integ-test-cache-cleanup.yml index 008507d8..16989abf 100644 --- a/.github/workflows/integ-test-cache-cleanup.yml +++ b/.github/workflows/integ-test-cache-cleanup.yml @@ -17,6 +17,7 @@ env: SKIP_DIST: ${{ inputs.skip-dist }} # Requires a fresh cache entry each run GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: cache-cleanup-${{ inputs.cache-key-prefix }}-${{github.run_number}} + GRADLE_BUILD_ACTION_CACHE_KEY_JOB: cache-cleanup permissions: contents: read @@ -45,6 +46,8 @@ jobs: # Second build will use the cache from the first build, but cleanup should remove unused artifacts cache-cleanup-assemble-build: + env: + GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_1 needs: cache-cleanup-full-build strategy: max-parallel: 1 @@ -68,6 +71,8 @@ jobs: run: ./gradlew --no-daemon --build-cache -Dcommons_math3_version="3.1.1" build cache-cleanup-check-clean-cache: + env: + GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_2 needs: cache-cleanup-assemble-build strategy: max-parallel: 1 diff --git a/.github/workflows/integ-test-restore-containerized-gradle-home.yml b/.github/workflows/integ-test-restore-containerized-gradle-home.yml index 60de5318..5951946c 100644 --- a/.github/workflows/integ-test-restore-containerized-gradle-home.yml +++ b/.github/workflows/integ-test-restore-containerized-gradle-home.yml @@ -13,6 +13,7 @@ on: env: SKIP_DIST: ${{ inputs.skip-dist }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-containerized-gradle-home-${{ inputs.cache-key-prefix }} + GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-containerized-gradle-home permissions: contents: read diff --git a/.github/workflows/integ-test-restore-custom-gradle-home.yml b/.github/workflows/integ-test-restore-custom-gradle-home.yml index 67af9ffe..0524e0bf 100644 --- a/.github/workflows/integ-test-restore-custom-gradle-home.yml +++ b/.github/workflows/integ-test-restore-custom-gradle-home.yml @@ -13,6 +13,7 @@ on: env: SKIP_DIST: ${{ inputs.skip-dist }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-custom-gradle-home-${{ inputs.cache-key-prefix }} + GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-custom-gradle-home permissions: contents: read diff --git a/.github/workflows/integ-test-restore-java-toolchain.yml b/.github/workflows/integ-test-restore-java-toolchain.yml index 8eb20dbf..abb4492e 100644 --- a/.github/workflows/integ-test-restore-java-toolchain.yml +++ b/.github/workflows/integ-test-restore-java-toolchain.yml @@ -16,6 +16,7 @@ on: env: SKIP_DIST: ${{ inputs.skip-dist }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-java-toolchain-${{ inputs.cache-key-prefix }} + GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-java-toolchain permissions: contents: read