-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Description Add two tests for RocksDB snapshots and marking the newest working snapshot as latest. ## Type of change Please delete options that are not relevant. - New feature (non-breaking change which adds functionality) # Checklist: * [Sync from snapshot, Testnet, ParityDB pruned](https://github.com/Cardinal-Cryptography/aleph-node/actions/runs/9254830988) - OK * [Sync from snapshot, Mainnet, ParityDB pruned](https://github.com/Cardinal-Cryptography/aleph-node/actions/runs/9264746877) - OK * [Sync from snapshot test, Testnet, ParityDB non-pruned](https://github.com/Cardinal-Cryptography/aleph-node/actions/runs/9255482291) - OK * [Sync from snapshot test, Mainnet, ParityDB non-pruned](https://github.com/Cardinal-Cryptography/aleph-node/actions/runs/9255482289) - OK * [Sync from snapshot test, Testnet, RocksDB](https://github.com/Cardinal-Cryptography/aleph-node/actions/runs/9255482283) - OK * [Sync from snapshot test, Mainnet, RocksDB](https://github.com/Cardinal-Cryptography/aleph-node/actions/runs/9264534797) - OK
- Loading branch information
1 parent
afbd11d
commit 1939835
Showing
12 changed files
with
486 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- | ||
name: Sync from snapshot test | ||
description: This workflow performs live chain (Mainnet or Testnet) sync from a db snapshot. | ||
inputs: | ||
aleph-node-artifact-name: | ||
required: true | ||
description: 'Name of artifact aleph-node binary' | ||
args: | ||
description: "Test arguments passed to bash test runner" | ||
type: string | ||
required: true | ||
snapshot-day: | ||
description: "Day in date format %Y-%m-%d. If not given, current date is assumed." | ||
type: string | ||
required: false | ||
aws-access-key-id: | ||
description: 'AWS Access Key ID to be used when storing artifacts' | ||
required: true | ||
type: string | ||
aws-secret-access-key: | ||
description: 'AWS Secret Access Key to be used when storing artifacts' | ||
required: true | ||
type: string | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download aleph-node from artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ inputs.aleph-node-artifact-name }} | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
env: | ||
AWS_REGION: us-east-1 | ||
with: | ||
aws-access-key-id: ${{ inputs.aws-access-key-id }} | ||
aws-secret-access-key: ${{ inputs.aws-secret-access-key }} | ||
aws-region: ${{ env.AWS_REGION }} | ||
|
||
- name: Get snapshot day | ||
id: get-snapshot-day | ||
shell: bash | ||
run: | | ||
if [[ '${{ inputs.snapshot-day }}' == "" ]]; then | ||
snapshot_day=$(date "+%Y-%m-%d") | ||
else | ||
snapshot_day='${{ inputs.snapshot-day }}' | ||
fi | ||
echo "snapshot-day=${snapshot_day}" >> $GITHUB_OUTPUT | ||
- name: Download snapshot and test db sync | ||
shell: bash | ||
run: | | ||
./.github/scripts/test_db_sync.sh \ | ||
${{ inputs.args }} \ | ||
--snapshot-day ${{ steps.get-snapshot-day.outputs.snapshot-day }} \ | ||
--mark-snapshot-as-latest | ||
- name: Archive logs from failed test | ||
if: ${{ failure() }} | ||
shell: bash | ||
run: | | ||
tar -czvf aleph-node-logs.tar.gz running/aleph-node.log | ||
- name: Upload logs from failed e2e test | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: aleph-node-logs.tar.gz | ||
name: aleph-node-logs.tar.gz | ||
if-no-files-found: error | ||
retention-days: 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.