From 0b8fa27eb1424ac87e1e01a0eee5d389aeb662e3 Mon Sep 17 00:00:00 2001 From: Daz DeBoer Date: Tue, 31 Mar 2026 22:16:59 -0600 Subject: [PATCH] Use a unique cache entry for wrapper-validation test (#921) This is necessary to avoid loading a cache entry from a different test, where the allowed wrapper checksums might have been cached, causing the wrapper validation to unexpectedly succeed. --- .github/workflows/integ-test-wrapper-validation.yml | 1 + sources/src/wrapper-validation/wrapper-validator.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/integ-test-wrapper-validation.yml b/.github/workflows/integ-test-wrapper-validation.yml index ac11e454..f93f196b 100644 --- a/.github/workflows/integ-test-wrapper-validation.yml +++ b/.github/workflows/integ-test-wrapper-validation.yml @@ -12,6 +12,7 @@ on: env: SKIP_DIST: ${{ inputs.skip-dist }} + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: wrapper-validation- # Avoid loading cache entries from other tests, that may have cached allowed wrapper checksums permissions: contents: read diff --git a/sources/src/wrapper-validation/wrapper-validator.ts b/sources/src/wrapper-validation/wrapper-validator.ts index 72b20f0e..1a50bb38 100644 --- a/sources/src/wrapper-validation/wrapper-validator.ts +++ b/sources/src/wrapper-validation/wrapper-validator.ts @@ -36,5 +36,6 @@ export async function validateWrappers( ) } + // TODO: Should not be caching the ALLOWED_GRADLE_WRAPPER_CHECKSUMS as they should only apply to the present run checksumCache.save(result.valid.map(wrapper => wrapper.checksum)) }