From c82b5a85d981293ba275134bd796d73f263a1b03 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Sat, 11 Jan 2025 23:51:45 +0000 Subject: [PATCH 01/17] ci: Use generic Docker volume cache action --- .github/workflows/test.yml | 35 +++++++++++------------------------ action.yaml | 38 ++++++++++++-------------------------- 2 files changed, 23 insertions(+), 50 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4dff1aa5fe..436e80ea56 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -56,12 +56,9 @@ jobs: sudo curl -L https://github.com/docker/compose/releases/download/v2.26.0/docker-compose-`uname -s`-`uname -m` -o "/usr/local/lib/docker/cli-plugins/docker-compose" sudo chmod +x "/usr/local/lib/docker/cli-plugins/docker-compose" - - name: Prepare Docker Volume Caching + - name: Compute Docker Volume Cache Key id: cache_key run: | - # Set permissions for docker volumes so we can cache and restore - sudo chmod o+x /var/lib/docker - sudo chmod -R o+rwx /var/lib/docker/volumes source .env SENTRY_IMAGE_SHA=$(docker buildx imagetools inspect $SENTRY_IMAGE --format "{{println .Manifest.Digest}}") echo "SENTRY_IMAGE_SHA=$SENTRY_IMAGE_SHA" >> $GITHUB_OUTPUT @@ -70,16 +67,16 @@ jobs: - name: Restore DB Volumes Cache id: restore_cache - uses: actions/cache/restore@v4 + uses: BYK/docker-volume-cache-action/restore@main with: key: db-volumes-v4-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }}-${{ steps.cache_key.outputs.SNUBA_IMAGE_SHA }} restore-keys: | db-volumes-v4-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }} db-volumes-v4- - path: | - /var/lib/docker/volumes/sentry-postgres/_data - /var/lib/docker/volumes/sentry-clickhouse/_data - /var/lib/docker/volumes/sentry-kafka/_data + volumes: | + sentry-postgres + sentry-clickhouse + sentry-kafka - name: Install ${{ env.LATEST_TAG }} env: @@ -89,25 +86,15 @@ jobs: docker run --rm -v "sentry-kafka:/data" busybox chown -R 1000:1000 /data ./install.sh - - name: Prepare Docker Volume Caching - run: | - # Set permissions for docker volumes so we can cache and restore - # We need these for the backup/restore test snapshotting too - sudo chmod o+x /var/lib/docker - sudo chmod -R o+rx /var/lib/docker/volumes - # Set tar ownership for it to be able to read - # From: https://github.com/actions/toolkit/issues/946#issuecomment-1726311681 - sudo chown root /usr/bin/tar && sudo chmod u+s /usr/bin/tar - - name: Save DB Volumes Cache if: steps.restore_cache.outputs.cache-hit != 'true' - uses: actions/cache/save@v4 + uses: BYK/docker-volume-cache-action/save@main with: key: ${{ steps.restore_cache.outputs.cache-primary-key }} - path: | - /var/lib/docker/volumes/sentry-postgres/_data - /var/lib/docker/volumes/sentry-clickhouse/_data - /var/lib/docker/volumes/sentry-kafka/_data + volumes: | + sentry-postgres + sentry-clickhouse + sentry-kafka - name: Checkout current ref uses: actions/checkout@v4 diff --git a/action.yaml b/action.yaml index 24baf35d6b..6e7c2068c1 100644 --- a/action.yaml +++ b/action.yaml @@ -54,13 +54,10 @@ runs: sudo curl -L https://github.com/docker/compose/releases/download/${{ env.COMPOSE_VERSION }}/docker-compose-`uname -s`-`uname -m` -o "${{ env.COMPOSE_PATH }}/docker-compose" sudo chmod +x "${{ env.COMPOSE_PATH }}/docker-compose" - - name: Prepare Docker Volume Caching + - name: Compute Docker Volume Cache Key id: cache_key shell: bash run: | - # Set permissions for docker volumes so we can cache and restore - sudo chmod o+x /var/lib/docker - sudo chmod -R o+rwx /var/lib/docker/volumes source ${{ github.action_path }}/.env SENTRY_IMAGE_SHA=$(docker buildx imagetools inspect $SENTRY_IMAGE --format "{{println .Manifest.Digest}}") echo "SENTRY_IMAGE_SHA=$SENTRY_IMAGE_SHA" >> $GITHUB_OUTPUT @@ -69,16 +66,16 @@ runs: - name: Restore DB Volumes Cache id: restore_cache - uses: actions/cache/restore@v4 + uses: BYK/docker-volume-cache-action/restore@main with: key: db-volumes-v4-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }}-${{ steps.cache_key.outputs.SNUBA_IMAGE_SHA }} restore-keys: | db-volumes-v4-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }} db-volumes-v4- - path: | - /var/lib/docker/volumes/sentry-postgres/_data - /var/lib/docker/volumes/sentry-clickhouse/_data - /var/lib/docker/volumes/sentry-kafka/_data + volumes: | + sentry-postgres + sentry-clickhouse + sentry-kafka - name: Install self-hosted env: @@ -100,31 +97,20 @@ runs: ./install.sh --no-report-self-hosted-issues --skip-commit-check - - name: Prepare Docker Volume Caching - shell: bash - run: | - # Set permissions for docker volumes so we can cache and restore - # We need these for the backup/restore test snapshotting too - sudo chmod o+x /var/lib/docker - sudo chmod -R o+rx /var/lib/docker/volumes - # Set tar ownership for it to be able to read - # From: https://github.com/actions/toolkit/issues/946#issuecomment-1726311681 - sudo chown root /usr/bin/tar && sudo chmod u+s /usr/bin/tar - sudo chown root /usr/bin/rsync && sudo chmod u+s /usr/bin/rsync - - name: Save DB Volumes Cache if: steps.restore_cache.outputs.cache-hit != 'true' - uses: actions/cache/save@v4 + uses: BYK/docker-volume-cache-action/save@main with: key: ${{ steps.restore_cache.outputs.cache-primary-key }} - path: | - /var/lib/docker/volumes/sentry-postgres/_data - /var/lib/docker/volumes/sentry-clickhouse/_data - /var/lib/docker/volumes/sentry-kafka/_data + volumes: | + sentry-postgres + sentry-clickhouse + sentry-kafka - name: Integration Test shell: bash run: | + sudo chown root /usr/bin/rsync && sudo chmod u+s /usr/bin/rsync rsync -aW --no-compress --mkpath \ /var/lib/docker/volumes/sentry-postgres \ /var/lib/docker/volumes/sentry-clickhouse \ From 7d2cf3c181baa118ca7308486136bb2f1aa89461 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Sun, 12 Jan 2025 00:06:07 +0000 Subject: [PATCH 02/17] remove kafka perms workaround too --- .github/workflows/test.yml | 2 -- action.yaml | 2 -- 2 files changed, 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 436e80ea56..d37365b8c0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,8 +82,6 @@ jobs: env: SKIP_DB_MIGRATIONS: ${{ steps.restore_cache.outputs.cache-hit == 'true' && '1' || '' }} run: | - # This is for the cache restore on Kafka to work in older releases - docker run --rm -v "sentry-kafka:/data" busybox chown -R 1000:1000 /data ./install.sh - name: Save DB Volumes Cache diff --git a/action.yaml b/action.yaml index 6e7c2068c1..5c8ac7fec3 100644 --- a/action.yaml +++ b/action.yaml @@ -83,8 +83,6 @@ runs: shell: bash run: | cd ${{ github.action_path }} - # This is for the cache restore on Kafka to work in older releases - docker run --rm -v "sentry-kafka:/data" busybox chown -R 1000:1000 /data # Add some customizations to test that path cat <> sentry/enhance-image.sh #!/bin/bash From cb8f59083266e5643a46a23bd5d586a991e6f43a Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Sun, 12 Jan 2025 02:00:22 +0000 Subject: [PATCH 03/17] better clickhouse check --- install/upgrade-clickhouse.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/upgrade-clickhouse.sh b/install/upgrade-clickhouse.sh index 05e74bb00b..bd69d7bf74 100644 --- a/install/upgrade-clickhouse.sh +++ b/install/upgrade-clickhouse.sh @@ -1,7 +1,7 @@ echo "${_group}Upgrading Clickhouse ..." # First check to see if user is upgrading by checking for existing clickhouse volume -if [[ -n "$(docker volume ls -q --filter name=sentry-clickhouse)" ]]; then +if docker compose ps -a | grep -q clickhouse; then # Start clickhouse if it is not already running $dc up --wait clickhouse From 5ca6b992e8e879614003311fe4d3c81738f48520 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Sun, 12 Jan 2025 02:02:37 +0000 Subject: [PATCH 04/17] avoid double fw slash --- action.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yaml b/action.yaml index 5c8ac7fec3..5040f25701 100644 --- a/action.yaml +++ b/action.yaml @@ -18,7 +18,7 @@ runs: shell: bash run: | image_var=$(echo ${{ inputs.project_name }}_IMAGE | tr '[:lower:]' '[:upper:]') - echo "${image_var}=${{ inputs.image_url }}" >> ${{ github.action_path }}/.env + echo "${image_var}=${{ inputs.image_url }}" >> ${{ github.action_path }}.env - name: Setup dev environment shell: bash @@ -58,7 +58,7 @@ runs: id: cache_key shell: bash run: | - source ${{ github.action_path }}/.env + source ${{ github.action_path }}.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}}") From 3e9752ed606ffead819c3d7b409bd1895c57bb5e Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Sun, 12 Jan 2025 02:06:38 +0000 Subject: [PATCH 05/17] try to fix the upgrade test --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d37365b8c0..a2995ee542 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,6 +82,10 @@ jobs: env: SKIP_DB_MIGRATIONS: ${{ steps.restore_cache.outputs.cache-hit == 'true' && '1' || '' }} run: | + # This is to compensate for a bug in upgrade-clickhouse where + # if we have sentry-clickhouse volume without the rest, it fails + # We may get sentry-clickhouse from the cache step above + install/create-docker-volumes.sh ./install.sh - name: Save DB Volumes Cache From 58721d68e4a8606c996a6544c561dc04fdc05a23 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Sun, 12 Jan 2025 02:10:33 +0000 Subject: [PATCH 06/17] temp fix for kafka --- action.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/action.yaml b/action.yaml index 5040f25701..8adcf12644 100644 --- a/action.yaml +++ b/action.yaml @@ -83,6 +83,8 @@ runs: shell: bash run: | cd ${{ github.action_path }} + # This is for the cache restore on Kafka to work in older releases + docker run --rm -v "sentry-kafka:/data" busybox chown -R 1000:1000 /data # Add some customizations to test that path cat <> sentry/enhance-image.sh #!/bin/bash @@ -96,7 +98,7 @@ runs: ./install.sh --no-report-self-hosted-issues --skip-commit-check - name: Save DB Volumes Cache - if: steps.restore_cache.outputs.cache-hit != 'true' + # if: steps.restore_cache.outputs.cache-hit != 'true' uses: BYK/docker-volume-cache-action/save@main with: key: ${{ steps.restore_cache.outputs.cache-primary-key }} From a20a3283bdbccbfae30467c0cea3cd9a76f0f078 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Sun, 12 Jan 2025 02:12:57 +0000 Subject: [PATCH 07/17] use the source luke --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a2995ee542..510a7a278e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -85,7 +85,7 @@ jobs: # This is to compensate for a bug in upgrade-clickhouse where # if we have sentry-clickhouse volume without the rest, it fails # We may get sentry-clickhouse from the cache step above - install/create-docker-volumes.sh + source install/create-docker-volumes.sh ./install.sh - name: Save DB Volumes Cache From 2860433cd5534e9fb221badf773e95c58adb2567 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Sun, 12 Jan 2025 02:17:23 +0000 Subject: [PATCH 08/17] Revert "temp fix for kafka" This reverts commit 58721d68e4a8606c996a6544c561dc04fdc05a23. --- action.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/action.yaml b/action.yaml index 8adcf12644..5040f25701 100644 --- a/action.yaml +++ b/action.yaml @@ -83,8 +83,6 @@ runs: shell: bash run: | cd ${{ github.action_path }} - # This is for the cache restore on Kafka to work in older releases - docker run --rm -v "sentry-kafka:/data" busybox chown -R 1000:1000 /data # Add some customizations to test that path cat <> sentry/enhance-image.sh #!/bin/bash @@ -98,7 +96,7 @@ runs: ./install.sh --no-report-self-hosted-issues --skip-commit-check - name: Save DB Volumes Cache - # if: steps.restore_cache.outputs.cache-hit != 'true' + if: steps.restore_cache.outputs.cache-hit != 'true' uses: BYK/docker-volume-cache-action/save@main with: key: ${{ steps.restore_cache.outputs.cache-primary-key }} From 78d9c6c5a4d8002bf1ad7b3319ad78a488f0e2cd Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Sun, 12 Jan 2025 02:34:12 +0000 Subject: [PATCH 09/17] Reapply "temp fix for kafka" This reverts commit 2860433cd5534e9fb221badf773e95c58adb2567. --- action.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/action.yaml b/action.yaml index 5040f25701..8adcf12644 100644 --- a/action.yaml +++ b/action.yaml @@ -83,6 +83,8 @@ runs: shell: bash run: | cd ${{ github.action_path }} + # This is for the cache restore on Kafka to work in older releases + docker run --rm -v "sentry-kafka:/data" busybox chown -R 1000:1000 /data # Add some customizations to test that path cat <> sentry/enhance-image.sh #!/bin/bash @@ -96,7 +98,7 @@ runs: ./install.sh --no-report-self-hosted-issues --skip-commit-check - name: Save DB Volumes Cache - if: steps.restore_cache.outputs.cache-hit != 'true' + # if: steps.restore_cache.outputs.cache-hit != 'true' uses: BYK/docker-volume-cache-action/save@main with: key: ${{ steps.restore_cache.outputs.cache-primary-key }} From 178d1c85fc04072f49743acb3aff583733727e07 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Sun, 12 Jan 2025 02:52:27 +0000 Subject: [PATCH 10/17] Revert "Reapply "temp fix for kafka"" This reverts commit 78d9c6c5a4d8002bf1ad7b3319ad78a488f0e2cd. --- action.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/action.yaml b/action.yaml index 8adcf12644..5040f25701 100644 --- a/action.yaml +++ b/action.yaml @@ -83,8 +83,6 @@ runs: shell: bash run: | cd ${{ github.action_path }} - # This is for the cache restore on Kafka to work in older releases - docker run --rm -v "sentry-kafka:/data" busybox chown -R 1000:1000 /data # Add some customizations to test that path cat <> sentry/enhance-image.sh #!/bin/bash @@ -98,7 +96,7 @@ runs: ./install.sh --no-report-self-hosted-issues --skip-commit-check - name: Save DB Volumes Cache - # if: steps.restore_cache.outputs.cache-hit != 'true' + if: steps.restore_cache.outputs.cache-hit != 'true' uses: BYK/docker-volume-cache-action/save@main with: key: ${{ steps.restore_cache.outputs.cache-primary-key }} From 8b3c7f1101eb25e76e1891dbdcc2b82e8846ef8c Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Sun, 12 Jan 2025 03:33:58 +0000 Subject: [PATCH 11/17] Reapply "Reapply "temp fix for kafka"" This reverts commit 178d1c85fc04072f49743acb3aff583733727e07. --- action.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/action.yaml b/action.yaml index 5040f25701..8adcf12644 100644 --- a/action.yaml +++ b/action.yaml @@ -83,6 +83,8 @@ runs: shell: bash run: | cd ${{ github.action_path }} + # This is for the cache restore on Kafka to work in older releases + docker run --rm -v "sentry-kafka:/data" busybox chown -R 1000:1000 /data # Add some customizations to test that path cat <> sentry/enhance-image.sh #!/bin/bash @@ -96,7 +98,7 @@ runs: ./install.sh --no-report-self-hosted-issues --skip-commit-check - name: Save DB Volumes Cache - if: steps.restore_cache.outputs.cache-hit != 'true' + # if: steps.restore_cache.outputs.cache-hit != 'true' uses: BYK/docker-volume-cache-action/save@main with: key: ${{ steps.restore_cache.outputs.cache-primary-key }} From ed9627362669cbeaf06b44c65c236b16bea6dced Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Sun, 12 Jan 2025 17:44:35 +0000 Subject: [PATCH 12/17] Revert "Reapply "Reapply "temp fix for kafka""" This reverts commit 8b3c7f1101eb25e76e1891dbdcc2b82e8846ef8c. --- action.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/action.yaml b/action.yaml index 8adcf12644..5040f25701 100644 --- a/action.yaml +++ b/action.yaml @@ -83,8 +83,6 @@ runs: shell: bash run: | cd ${{ github.action_path }} - # This is for the cache restore on Kafka to work in older releases - docker run --rm -v "sentry-kafka:/data" busybox chown -R 1000:1000 /data # Add some customizations to test that path cat <> sentry/enhance-image.sh #!/bin/bash @@ -98,7 +96,7 @@ runs: ./install.sh --no-report-self-hosted-issues --skip-commit-check - name: Save DB Volumes Cache - # if: steps.restore_cache.outputs.cache-hit != 'true' + if: steps.restore_cache.outputs.cache-hit != 'true' uses: BYK/docker-volume-cache-action/save@main with: key: ${{ steps.restore_cache.outputs.cache-primary-key }} From 00f0a6708f9189719dcb32503ade257d0ac94ce4 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Sun, 12 Jan 2025 19:58:16 +0000 Subject: [PATCH 13/17] try bumping cache key version --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 510a7a278e..4da9047861 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -69,10 +69,10 @@ jobs: id: restore_cache uses: BYK/docker-volume-cache-action/restore@main with: - key: db-volumes-v4-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }}-${{ steps.cache_key.outputs.SNUBA_IMAGE_SHA }} + key: db-volumes-v5-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }}-${{ steps.cache_key.outputs.SNUBA_IMAGE_SHA }} restore-keys: | - db-volumes-v4-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }} - db-volumes-v4- + db-volumes-v5-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }} + db-volumes-v5- volumes: | sentry-postgres sentry-clickhouse From 555d9e90bae112fae9d506cd770a2343d6ba3e59 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Sun, 12 Jan 2025 20:03:56 +0000 Subject: [PATCH 14/17] bump cache version everywhere --- action.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/action.yaml b/action.yaml index 5040f25701..25e474a206 100644 --- a/action.yaml +++ b/action.yaml @@ -68,10 +68,10 @@ runs: id: restore_cache uses: BYK/docker-volume-cache-action/restore@main with: - key: db-volumes-v4-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }}-${{ steps.cache_key.outputs.SNUBA_IMAGE_SHA }} + key: db-volumes-v5-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }}-${{ steps.cache_key.outputs.SNUBA_IMAGE_SHA }} restore-keys: | - db-volumes-v4-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }} - db-volumes-v4- + db-volumes-v5-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }} + db-volumes-v5- volumes: | sentry-postgres sentry-clickhouse From 8b580393daf1e556f79eebf804373f5231e1f9df Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Sun, 12 Jan 2025 21:17:39 +0000 Subject: [PATCH 15/17] change cache version again, use the newest tar hack --- .github/workflows/test.yml | 6 +++--- action.yaml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4da9047861..32ca3d566f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -69,10 +69,10 @@ jobs: id: restore_cache uses: BYK/docker-volume-cache-action/restore@main with: - key: db-volumes-v5-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }}-${{ steps.cache_key.outputs.SNUBA_IMAGE_SHA }} + key: db-volumes-v4-beta-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }}-${{ steps.cache_key.outputs.SNUBA_IMAGE_SHA }} restore-keys: | - db-volumes-v5-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }} - db-volumes-v5- + db-volumes-v4-beta-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }} + db-volumes-v4-beta- volumes: | sentry-postgres sentry-clickhouse diff --git a/action.yaml b/action.yaml index 25e474a206..c579dfccca 100644 --- a/action.yaml +++ b/action.yaml @@ -68,10 +68,10 @@ runs: id: restore_cache uses: BYK/docker-volume-cache-action/restore@main with: - key: db-volumes-v5-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }}-${{ steps.cache_key.outputs.SNUBA_IMAGE_SHA }} + key: db-volumes-v4-beta-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }}-${{ steps.cache_key.outputs.SNUBA_IMAGE_SHA }} restore-keys: | - db-volumes-v5-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }} - db-volumes-v5- + db-volumes-v4-beta-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }} + db-volumes-v4-beta- volumes: | sentry-postgres sentry-clickhouse From 99eb5bf17c15ef13c6fe8bbe3081474967ee5f44 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Mon, 13 Jan 2025 11:37:40 +0000 Subject: [PATCH 16/17] try with fresh cache --- .github/workflows/test.yml | 6 +++--- action.yaml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 32ca3d566f..24461cc195 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -69,10 +69,10 @@ jobs: id: restore_cache uses: BYK/docker-volume-cache-action/restore@main with: - key: db-volumes-v4-beta-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }}-${{ steps.cache_key.outputs.SNUBA_IMAGE_SHA }} + key: db-volumes-v4-b.1-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }}-${{ steps.cache_key.outputs.SNUBA_IMAGE_SHA }} restore-keys: | - db-volumes-v4-beta-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }} - db-volumes-v4-beta- + db-volumes-v4-b.1-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }} + db-volumes-v4-b.1- volumes: | sentry-postgres sentry-clickhouse diff --git a/action.yaml b/action.yaml index c579dfccca..daaf91bf45 100644 --- a/action.yaml +++ b/action.yaml @@ -68,10 +68,10 @@ runs: id: restore_cache uses: BYK/docker-volume-cache-action/restore@main with: - key: db-volumes-v4-beta-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }}-${{ steps.cache_key.outputs.SNUBA_IMAGE_SHA }} + key: db-volumes-v4-b.1-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }}-${{ steps.cache_key.outputs.SNUBA_IMAGE_SHA }} restore-keys: | - db-volumes-v4-beta-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }} - db-volumes-v4-beta- + db-volumes-v4-b.1-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }} + db-volumes-v4-b.1- volumes: | sentry-postgres sentry-clickhouse From 88026b67b9f339d3b07c0ace906fd11be748c0a2 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Tue, 14 Jan 2025 14:10:46 +0000 Subject: [PATCH 17/17] use and pin to stable release git sha --- .github/workflows/test.yml | 4 ++-- action.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ceaebeb017..3e471c84ba 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -67,7 +67,7 @@ jobs: - name: Restore DB Volumes Cache id: restore_cache - uses: BYK/docker-volume-cache-action/restore@main + uses: BYK/docker-volume-cache-action/restore@be89365902126f508dcae387a32ec3712df6b1cd with: key: db-volumes-v6-${{ steps.cache_key.outputs.SNUBA_MIGRATIONS_MD5 }}-${{ steps.cache_key.outputs.SENTRY_MIGRATIONS_MD5 }} restore-keys: | @@ -90,7 +90,7 @@ jobs: - name: Save DB Volumes Cache if: steps.restore_cache.outputs.cache-hit != 'true' - uses: BYK/docker-volume-cache-action/save@main + uses: BYK/docker-volume-cache-action/save@be89365902126f508dcae387a32ec3712df6b1cd with: key: ${{ steps.restore_cache.outputs.cache-primary-key }} volumes: | diff --git a/action.yaml b/action.yaml index b48630bd8e..ec5897f0a2 100644 --- a/action.yaml +++ b/action.yaml @@ -68,7 +68,7 @@ runs: - name: Restore DB Volumes Cache id: restore_cache - uses: BYK/docker-volume-cache-action/restore@main + uses: BYK/docker-volume-cache-action/restore@be89365902126f508dcae387a32ec3712df6b1cd with: key: db-volumes-v6-${{ steps.cache_key.outputs.SNUBA_MIGRATIONS_MD5 }}-${{ steps.cache_key.outputs.SENTRY_MIGRATIONS_MD5 }} restore-keys: | @@ -99,7 +99,7 @@ runs: - name: Save DB Volumes Cache if: steps.restore_cache.outputs.cache-hit != 'true' - uses: BYK/docker-volume-cache-action/save@main + uses: BYK/docker-volume-cache-action/save@be89365902126f508dcae387a32ec3712df6b1cd with: key: ${{ steps.restore_cache.outputs.cache-primary-key }} volumes: |