Unverified Commit 0b8fa27e authored by Daz DeBoer's avatar Daz DeBoer Committed by GitHub
Browse files

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.
parent 263d8fe1
Loading
Loading
Loading
Loading
+1
Changes for .github/workflows/integ-test-wrapper-validation.yml: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -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
+1
Changes for sources/src/wrapper-validation/wrapper-validator.ts: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -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))
}