From 25135b5bdb427cf77efe184799233be605c0a4e2 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Sun, 22 Dec 2024 22:58:01 +0300 Subject: [PATCH] include snuba image sha in cache key --- .github/workflows/test.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 56740d635e..7c3acc1ba7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -80,13 +80,16 @@ jobs: source .env SENTRY_IMAGE_SHA=$(docker buildx imagetools inspect $SENTRY_IMAGE --format "{{println .Manifest.Digest}}") echo "SENTRY_IMAGE_SHA=$SENTRY_IMAGE_SHA" >> $GITHUB_OUTPUT + SNUBA_IMAGE_SHA=$(docker buildx imagetools inspect $SNUBA_IMAGE --format "{{println .Manifest.Digest}}") + echo "SNUBA_IMAGE_SHA=$SNUBA_IMAGE_SHA" >> $GITHUB_OUTPUT - name: Restore DB Volumes Cache id: restore_cache uses: actions/cache/restore@v4 with: - key: db-volumes-v2-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }} + key: db-volumes-v2-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }}-${{ steps.cache_key.outputs.SNUBA_IMAGE_SHA }} restore-keys: | + db-volumes-v2-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }} db-volumes-v2- db-volumes- path: | @@ -178,13 +181,16 @@ jobs: source .env SENTRY_IMAGE_SHA=$(docker buildx imagetools inspect $SENTRY_IMAGE --format "{{println .Manifest.Digest}}") echo "SENTRY_IMAGE_SHA=$SENTRY_IMAGE_SHA" >> $GITHUB_OUTPUT + SNUBA_IMAGE_SHA=$(docker buildx imagetools inspect $SNUBA_IMAGE --format "{{println .Manifest.Digest}}") + echo "SNUBA_IMAGE_SHA=$SNUBA_IMAGE_SHA" >> $GITHUB_OUTPUT - name: Restore DB Volumes Cache id: restore_cache uses: actions/cache/restore@v4 with: - key: db-volumes-v2-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }} + key: db-volumes-v2-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }}-${{ steps.cache_key.outputs.SNUBA_IMAGE_SHA }} restore-keys: | + db-volumes-v2-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }} db-volumes-v2- db-volumes- path: |