Skip to content

Commit 3129f2b

Browse files
sigurpolpepoviolax3c41arockbmbmuharem
authored
Change timing of AH/RC pre and post snapshots (#247)
* Change timing of AH/RC pre and post snapshots Pre-migration: - RC snapshot: taken at block with state transition to AccountsMigrationInit - AH snapshot: taken at block with state transition to DataMigrationOngoing + 1 Post-migration: - RC snapshot: taken at block with state transition to CoolOff - AH snapshot: taken at block with state transition to CoolOff Driven-by: update runtime to include CoolOff as state transition for AH. * Cleanup * Cleanup * More cleanup * Fix AH pre-snapshot block detection * Update zombie-bite-scripts/helpers.ts Co-authored-by: Javier Viola <[email protected]> * Fix cool-off check * Raise timeout for RC snapshot to 12h to accommoadate for Polkadot migration * Update runtime to point to runtime muharem-ahm-polkadot * Suppress try-runtime verbose output to avoid child_process exec maxBuffer * Take all 4 snapshots past AH and RC CoolOff * monitoring: poll via RPC instead of WS long-live connection * incorporate ci changes/debug * show output in ci * debug self hosted with ops * fix get block numbers * small nits for ci * fix path to check * fix tmpl * fix tmpl * clean in ubuntu * Fixes for use post-db as starting point (#251) * test * test ci without docker * allow to use a post-db * add option to workflow * add option to workflow * fix option for action * fix action * workaround db snap * workaround db snap * workaround db snap * change zombie-bite install * changes to run ts test with post db * add script * Improved zombie-bite termination logic (#250) * changed zombie-bite stop logic * refactor * Bump PET to include PAHM E2E test suites (#249) * Bump PET to include PAHM E2E test suites * Default network to polkadot in PET workflow * Bump PET submodule to commit with passing PAH tests It also includes snapshots for passing PAH E2E tests, from October 21st. * Bump PET to include PAHM child bounty tests \also has KAH vesting test fixes, which are also replicated in PAHM. --------- Co-authored-by: Andrii <[email protected]> Co-authored-by: Alexandre R. Baldé <[email protected]> * more work on ci * multiple patterns for download pre-db * add support for old pre-db * typo and less interval in CI --------- Co-authored-by: Javier Viola <[email protected]> Co-authored-by: Javier Viola <[email protected]> Co-authored-by: Andrii <[email protected]> Co-authored-by: Alexandre R. Baldé <[email protected]> Co-authored-by: muharem <[email protected]>
1 parent 2b4181d commit 3129f2b

File tree

16 files changed

+753
-567
lines changed

16 files changed

+753
-567
lines changed

.github/actions/download-artifact/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,13 @@ runs:
3535
echo "downloading artifacts from https://github.com/paritytech/ahm-dryrun/actions/runs/${RUN_ID}"
3636
3737
if [[ $NAME_PATTERN == "" ]]; then
38-
gh run download $RUN_ID -p "${NAME_PATTERN}" -D $TMP_DIR
38+
gh run download $RUN_ID -D $TMP_DIR
3939
else
40-
gh run download $RUN_ID -p "${NAME_PATTERN}" -D $TMP_DIR
40+
PATTERNS=""
41+
for p in $(echo $NAME_PATTERN| tr "," "\n");do
42+
PATTERNS="$PATTERNS -p $p "
43+
done
44+
gh run download $RUN_ID $PATTERNS -D $TMP_DIR
4145
fi;
4246
4347
ARTIFACTS_DIR=$(ls -t $TMP_DIR|head -1)

.github/actions/download-doppelganger-binaries/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ runs:
2626
VERSION_TO_DOWNLOAD=$(curl https://api.github.com/repos/paritytech/doppelganger-wrapper/releases/latest | jq -r .tag_name)
2727
fi;
2828
for bin in doppelganger doppelganger-parachain polkadot-execute-worker polkadot-prepare-worker; do
29-
echo "downloading $bin";
29+
echo "downloading $bin from https://github.com/paritytech/doppelganger-wrapper/releases/download/$VERSION_TO_DOWNLOAD/$bin";
3030
curl -L -o $DESTINATION_PATH/$bin https://github.com/paritytech/doppelganger-wrapper/releases/download/$VERSION_TO_DOWNLOAD/$bin;
3131
chmod 755 $DESTINATION_PATH/$bin;
3232
done;

.github/actions/download-post-migration-db/action.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,31 @@ runs:
2121
run: |
2222
set -euo pipefail
2323
TMP_DIR="$(mktemp -d)"
24-
25-
curl -sSLf -H "Authorization: Bearer ${GITHUB_TOKEN}" -o "${TMP_DIR}/artifact.zip" "${ARTIFACT_URL}"
26-
24+
25+
FILENAME=$(basename ${ARTIFACT_URL})
26+
27+
IS_GITHUB=$(echo ${ARTIFACT_URL}| grep -o github || true)
28+
IS_ZIP=$(echo ${ARTIFACT_URL}| grep -o zip || true)
29+
if [[ $IS_GITHUB == "github" ]];then
30+
curl -sSLf -H "Authorization: Bearer ${GITHUB_TOKEN}" -o "${TMP_DIR}/${FILENAME}" "${ARTIFACT_URL}"
31+
else
32+
curl -sSLf -o "${TMP_DIR}/${FILENAME}" "${ARTIFACT_URL}"
33+
fi;
34+
2735
rm -rf "${DESTINATION_PATH}"
2836
mkdir -p "${DESTINATION_PATH}"
29-
unzip -q "${TMP_DIR}/artifact.zip" -d "${DESTINATION_PATH}"
37+
38+
if [[ $IS_ZIP == "zip" ]];then
39+
unzip -q "${TMP_DIR}/${FILENAME}" -d "${DESTINATION_PATH}"
40+
else
41+
tar -xvf "${TMP_DIR}/${FILENAME}" -C "${DESTINATION_PATH}"
42+
fi;
43+
3044
rm -rf "${TMP_DIR}"
31-
32-
ls "${DESTINATION_PATH}"
45+
echo "ls dst path"
46+
ls "${DESTINATION_PATH}"
47+
mv ${DESTINATION_PATH}/pahm/spawn ${DESTINATION_PATH}/
48+
mv ${DESTINATION_PATH}/pahm/ready.json ${DESTINATION_PATH}/
49+
mv ${DESTINATION_PATH}/pahm/ports.json ${DESTINATION_PATH}/
50+
echo "ls dst path"
51+
ls "${DESTINATION_PATH}"

.github/actions/wait-zb-network-ready/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ runs:
1717
shell: bash
1818
run: |
1919
echo "Waiting for 'network is up and running' message..."
20-
timeout 300 bash -c '
20+
timeout 900 bash -c '
2121
while ! grep -q "network is up and running" $LOG_FILE 2>/dev/null; do
2222
echo "Still waiting for network... last log line:"
2323
tail -1 $LOG_FILE

.github/workflows/migration-schedule-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ permissions: {}
2323
jobs:
2424
get-run-id:
2525
runs-on: ubuntu-latest
26-
if: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.run-id == '') || 'true' }}
26+
if: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.run-id == '') }}
2727
outputs:
2828
RUN_ID: ${{ steps.get_run_id.outputs.RUN_ID }}
2929
steps:

.github/workflows/rust-tests-common.yml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -56,38 +56,28 @@ jobs:
5656
echo "downloading artifacts from https://github.com/paritytech/ahm-dryrun/actions/runs/${RUN_ID}"
5757
gh run download $RUN_ID -p "${NETWORK}-try-runtime*" -D $SNAPS_PATH
5858
ls -ltr $SNAPS_PATH
59-
ARTIFACTS_DIR_PRE=$(ls -t $SNAPS_PATH|grep try-runtime-snaps-pre)
60-
ARTIFACTS_DIR_POST=$(ls -t $SNAPS_PATH|grep try-runtime-snaps-post)
61-
echo "ARTIFACTS_DIR_PRE=$SNAPS_PATH/$ARTIFACTS_DIR_PRE" >> $GITHUB_OUTPUT
62-
echo "ARTIFACTS_DIR_POST=$SNAPS_PATH/$ARTIFACTS_DIR_POST" >> $GITHUB_OUTPUT
59+
# Single artifact contains all 4 snapshots
60+
ARTIFACTS_DIR=$(ls -t $SNAPS_PATH|grep try-runtime-snaps|grep -v pre|grep -v post|head -1)
61+
echo "ARTIFACTS_DIR=$SNAPS_PATH/$ARTIFACTS_DIR" >> $GITHUB_OUTPUT
6362
6463
- name: verify_and_move_snaps
6564
shell: bash
6665
env:
6766
NETWORK: ${{ inputs.network }}
6867
run: |
69-
for i in rc-pre.snap ah-pre.snap;do
70-
if [ ! -f "${{ steps.download_artifacts.outputs.ARTIFACTS_DIR_PRE }}/${NETWORK}-${i}" ]; then
68+
# All 4 snapshots are in a single artifact directory
69+
for i in rc-pre.snap ah-pre.snap rc-post.snap ah-post.snap;do
70+
if [ ! -f "${{ steps.download_artifacts.outputs.ARTIFACTS_DIR }}/${NETWORK}-${i}" ]; then
7171
echo "ERROR: Could not find ${NETWORK}-${i}"
7272
exit 1
7373
else
74-
mv "${{ steps.download_artifacts.outputs.ARTIFACTS_DIR_PRE }}/${NETWORK}-${i}" $SNAPS_PATH
75-
fi
76-
done;
77-
78-
for i in rc-post.snap ah-post.snap;do
79-
if [ ! -f "${{ steps.download_artifacts.outputs.ARTIFACTS_DIR_POST }}/${NETWORK}-${i}" ]; then
80-
echo "ERROR: Could not find ${NETWORK}-${i}"
81-
exit 1
82-
else
83-
mv "${{ steps.download_artifacts.outputs.ARTIFACTS_DIR_POST }}/${NETWORK}-${i}" $SNAPS_PATH
74+
mv "${{ steps.download_artifacts.outputs.ARTIFACTS_DIR }}/${NETWORK}-${i}" $SNAPS_PATH
8475
fi
8576
done;
8677
8778
echo "final files in ${SNAPS_PATH}"
8879
ls -ltr $SNAPS_PATH
8980
90-
9181
- name: run_rust_tests
9282
shell: bash
9383
env:

0 commit comments

Comments
 (0)