Skip to content

Commit

Permalink
A0-0000: Fix once again snapshot workflows (#1949)
Browse files Browse the repository at this point in the history
Revert "A0-4546: Extend github-based tests for pruning with pruned
rocksdb snapshot (#1948)"

This reverts commit 81c377d.

Removed Parity non-pruned workflows for Testnet and Mainnet. Added
RocksDB Pruned workflows for Mainnet and Testnet.

## Testing

Run manually ParityDB Pruned for Mainnet and Testnet, which were not
triggered for 2025-02-22 day.
*
https://github.com/Cardinal-Cryptography/aleph-node/actions/runs/13493135548
*
https://github.com/Cardinal-Cryptography/aleph-node/actions/runs/13493135540
  • Loading branch information
Marcin-Radecki authored Feb 24, 2025
1 parent 81c377d commit ab1c4f4
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
15 changes: 8 additions & 7 deletions .github/scripts/test_db_sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ while [[ $# -gt 0 ]]; do
esac
done

if [[ "${PRUNING}" == "true" && "${PARITY_DB}" == "true" ]]; then
echo "Error! Passed '--pruned' with'--parity-db'"
if [[ "${PRUNING}" == "false" && "${PARITY_DB}" == "true" ]]; then
echo "Error! Passed '--parity-db' without '--pruned'."
echo "That is an unsupported argument combination."
exit 1
fi
Expand Down Expand Up @@ -67,17 +67,18 @@ fi
declare -a DB_ARG
S3_SNAPSHOT_PREFIX=""
LATEST_SNAPSHOT_NAME=""
if [[ "${PARITY_DB}" == "true" ]]; then
if [[ "${PARITY_DB}" == "true" && "${PRUNING}" == "true" ]]; then
DB_ARG+=("--database paritydb")
S3_SNAPSHOT_PREFIX="db_backup_parity"
LATEST_SNAPSHOT_NAME="latest-parity.html"
DB_ARG+=("--enable-pruning")
S3_SNAPSHOT_PREFIX="db_backup_parity_pruned"
LATEST_SNAPSHOT_NAME="latest-parity-pruned.html"
fi
if [[ "${PRUNING}" == "true" ]]; then
if [[ "${PARITY_DB}" == "false" && "${PRUNING}" == "true" ]]; then
DB_ARG+=("--enable-pruning")
S3_SNAPSHOT_PREFIX="db_backup_rocksdb_pruned"
LATEST_SNAPSHOT_NAME="latest-rocksdb-pruned.html"
fi
if [[ "${PRUNING}" != "true" ]]; then
if [[ "${PARITY_DB}" == "false" && "${PRUNING}" == "false" ]]; then
S3_SNAPSHOT_PREFIX="db_backup"
LATEST_SNAPSHOT_NAME="latest.html"
fi
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
# This workflow performs sync to Mainnet from a ParityDB non-pruned snapshot using the latest
# This workflow performs sync to Mainnet from a pruned ParityDB snapshot using the latest
# main version.
#
# For now, this test not quite correctly tests sync Mainnet from latest aleph-node binary,
# for which we don't guarantee it will always happen to work.

name: Sync from snapshot test, Mainnet, ParityDB non-pruned
name: Sync from snapshot, Mainnet, ParityDB pruned
on:
# At 15:00 on Sunday
# Time corresponds with a snapshot creation time
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
needs: [build-production-aleph-node]
name: Download snapshot and run
runs-on: [self-hosted, Linux, X64, euc1-med-xldisk]
timeout-minutes: 360
timeout-minutes: 120
steps:
- name: Checkout source code
uses: actions/checkout@v4
Expand All @@ -51,7 +51,7 @@ jobs:
with:
# yamllint disable-line rule:line-length
aleph-node-artifact-name: ${{ needs.build-production-aleph-node.outputs.artifact-name-binary }}
args: --mainnet --parity-db
args: --mainnet --parity-db --pruned
aws-access-key-id: ${{ secrets.AWS_MAINNET_S3_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_MAINNET_S3_SECRET_ACCESS_KEY }}
snapshot-day: ${{ inputs.snapshot-day }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
# This workflow performs sync to Mainnet from a pruned RocksDB snapshot using the latest
# This workflow performs sync to Mainnet from a RocksDB pruned snapshot using the latest
# main version.
#
# For now, this test not quite correctly tests sync Mainnet from latest aleph-node binary,
# for which we don't guarantee it will always happen to work.

name: Sync from snapshot, Mainnet, RocksDB pruned
name: Sync from snapshot test, Mainnet, RocksDB pruned
on:
# At 15:00 on Sunday
# Time corresponds with a snapshot creation time
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
# This workflow performs sync to Testnet from a ParityDB non-pruned snapshot using the latest
# This workflow performs sync to Testnet from a pruned ParityDB snapshot using the latest
# main version.

name: Sync from snapshot test, Testnet, ParityDB non-pruned
name: Sync from snapshot, Testnet, ParityDB pruned
on:
# At 15:00 on Sunday
# Time corresponds with a snapshot creation time
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
needs: [build-production-aleph-node]
name: Download snapshot and run
runs-on: [self-hosted, Linux, X64, euc1-med-xldisk]
timeout-minutes: 360
timeout-minutes: 120
steps:
- name: Checkout source code
uses: actions/checkout@v4
Expand All @@ -48,7 +48,7 @@ jobs:
with:
# yamllint disable-line rule:line-length
aleph-node-artifact-name: ${{ needs.build-production-aleph-node.outputs.artifact-name-binary }}
args: --testnet --parity-db
args: --testnet --parity-db --pruned
aws-access-key-id: ${{ secrets.AWS_TESTNET_S3_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_TESTNET_S3_SECRET_ACCESS_KEY }}
snapshot-day: ${{ inputs.snapshot-day }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
# This workflow performs sync to Testnet from a pruned RocksDB snapshot using the latest
# This workflow performs sync to Testnet from a RocksDB pruned snapshot using the latest
# main version.

name: Sync from snapshot, Testnet, RocksDB pruned
name: Sync from snapshot test, Testnet, RocksDB pruned
on:
# At 15:00 on Sunday
# Time corresponds with a snapshot creation time
Expand Down

0 comments on commit ab1c4f4

Please sign in to comment.