From ab1c4f47abd35f20129e0c9594f711d27bba76a7 Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 24 Feb 2025 14:01:49 +0100 Subject: [PATCH] A0-0000: Fix once again snapshot workflows (#1949) Revert "A0-4546: Extend github-based tests for pruning with pruned rocksdb snapshot (#1948)" This reverts commit 81c377d0e0fc866ccf7c71e10a2b18170f03e571. 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 --- .github/scripts/test_db_sync.sh | 15 ++++++++------- ...ync-from-snapshot-mainnet-paritydb-pruned.yml} | 8 ++++---- .../sync-from-snapshot-mainnet-rocksdb-pruned.yml | 4 ++-- ...ync-from-snapshot-testnet-paritydb-pruned.yml} | 8 ++++---- .../sync-from-snapshot-testnet-rocksdb-pruned.yml | 4 ++-- 5 files changed, 20 insertions(+), 19 deletions(-) rename .github/workflows/{sync-from-snapshot-mainnet-paritydb.yml => sync-from-snapshot-mainnet-paritydb-pruned.yml} (90%) rename .github/workflows/{sync-from-snapshot-testnet-paritydb.yml => sync-from-snapshot-testnet-paritydb-pruned.yml} (89%) diff --git a/.github/scripts/test_db_sync.sh b/.github/scripts/test_db_sync.sh index b9b0b1fc0e..a7cfb10d94 100755 --- a/.github/scripts/test_db_sync.sh +++ b/.github/scripts/test_db_sync.sh @@ -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 @@ -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 diff --git a/.github/workflows/sync-from-snapshot-mainnet-paritydb.yml b/.github/workflows/sync-from-snapshot-mainnet-paritydb-pruned.yml similarity index 90% rename from .github/workflows/sync-from-snapshot-mainnet-paritydb.yml rename to .github/workflows/sync-from-snapshot-mainnet-paritydb-pruned.yml index ad385756f3..5c47ad0c75 100644 --- a/.github/workflows/sync-from-snapshot-mainnet-paritydb.yml +++ b/.github/workflows/sync-from-snapshot-mainnet-paritydb-pruned.yml @@ -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 @@ -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 @@ -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 }} diff --git a/.github/workflows/sync-from-snapshot-mainnet-rocksdb-pruned.yml b/.github/workflows/sync-from-snapshot-mainnet-rocksdb-pruned.yml index b7bbed3bee..304efb7805 100644 --- a/.github/workflows/sync-from-snapshot-mainnet-rocksdb-pruned.yml +++ b/.github/workflows/sync-from-snapshot-mainnet-rocksdb-pruned.yml @@ -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 diff --git a/.github/workflows/sync-from-snapshot-testnet-paritydb.yml b/.github/workflows/sync-from-snapshot-testnet-paritydb-pruned.yml similarity index 89% rename from .github/workflows/sync-from-snapshot-testnet-paritydb.yml rename to .github/workflows/sync-from-snapshot-testnet-paritydb-pruned.yml index 844ad2d326..c495fd68ea 100644 --- a/.github/workflows/sync-from-snapshot-testnet-paritydb.yml +++ b/.github/workflows/sync-from-snapshot-testnet-paritydb-pruned.yml @@ -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 @@ -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 @@ -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 }} diff --git a/.github/workflows/sync-from-snapshot-testnet-rocksdb-pruned.yml b/.github/workflows/sync-from-snapshot-testnet-rocksdb-pruned.yml index 2bb7946696..742d750f8a 100644 --- a/.github/workflows/sync-from-snapshot-testnet-rocksdb-pruned.yml +++ b/.github/workflows/sync-from-snapshot-testnet-rocksdb-pruned.yml @@ -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