Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix snapshot-reset workflow semantics & cloudflare r2 compatibility #2427

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/scripts/reset-snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ reset_snapshot() {
snapshot_zip_filename_array=("$snapshot_zip_filename")
snapshot_zip_filename_array+=("latest.zip")
snapshot_zip_filename_array+=("latest.json")
aws s3 cp "$2/state_latest.zip" "$1/state_latest.zip"
aws s3 cp "$2/latest.zip" "$1/latest.zip"
aws s3 cp "$2/state_latest.zip" "$1/state_latest.zip" --copy-props none --metadata-directive COPY
aws s3 cp "$2/latest.zip" "$1/latest.zip" --copy-props none --metadata-directive COPY
aws s3 cp "$2/latest.json" "$1/latest.json"
aws s3 cp "$2/latest.json" "$1/mainnet_latest.json"
NEW_SNAPSHOT_TIP=$(curl --silent "snapshots.nine-chronicles.com/$BASE_URL_PATH/latest.json" | jq ".Index")
Expand Down Expand Up @@ -85,7 +85,7 @@ reset_snapshot() {
done

# copy main cluster chain to internal (copy state_latest.zip first)
aws s3 cp "$2/state_latest.zip" "$1/state_latest.zip"
aws s3 cp "$2/state_latest.zip" "$1/state_latest.zip" --copy-props none --metadata-directive COPY
for f in $(aws s3 ls $2/ | sort -k1,2 | sort -r | awk 'NF>1{print $4}' | grep "zip\|json" | grep -v "state_latest.zip"); do
echo $f
aws s3 cp $(echo $f | sed "s/.*/$MAIN_PREFIX&/") $(echo $f | sed "s/.*/$INTERNAL_PREFIX&/")
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/snapshot-reset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,12 @@ jobs:

reset-bridge-service:
needs: [reset-snapshot, set-targets]
if: ${{ matrix.bridge_chain != 'odin' }} # Skip if bridge_chain is 'odin'
strategy:
fail-fast: false
matrix:
bridge_chain: ${{ fromJson(needs.set-targets.outputs.bridge_chains) }}
exclude:
- bridge_chain: odin
uses: ./.github/workflows/reset-bridge-service.yaml
secrets: inherit
with:
Expand Down
Loading