Skip to content

Commit

Permalink
fix(e2e): improve upgrade version logic (#2544)
Browse files Browse the repository at this point in the history
* fix(e2e): improve upgrade version logic

* fix mainnet import timeout
  • Loading branch information
gartnera authored Jul 24, 2024
1 parent a27aa9a commit 43e78b8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ jobs:
- make-target: "start-upgrade-import-mainnet-test"
runs-on: buildjet-16vcpu-ubuntu-2204
run: ${{ needs.matrix-conditionals.outputs.UPGRADE_IMPORT_MAINNET_TESTS == 'true' }}
timeout-minutes: 40
- make-target: "start-e2e-admin-test"
runs-on: ubuntu-20.04
run: ${{ needs.matrix-conditionals.outputs.ADMIN_TESTS == 'true' }}
Expand All @@ -154,6 +155,7 @@ jobs:
- make-target: "start-e2e-import-mainnet-test"
runs-on: buildjet-16vcpu-ubuntu-2204
run: ${{ needs.matrix-conditionals.outputs.STATEFUL_DATA_TESTS == 'true' }}
timeout-minutes: 40
- make-target: "start-tss-migration-test"
runs-on: ubuntu-20.04
run: ${{ needs.matrix-conditionals.outputs.TSS_MIGRATION_TESTS == 'true' }}
Expand Down
14 changes: 9 additions & 5 deletions contrib/localnet/orchestrator/start-zetae2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ get_zetacored_version() {
retries=10
node_info=""
for ((attempt=1; attempt<=$retries; attempt++)); do
node_info=$(curl -s zetacore0:1317/cosmos/base/tendermint/v1beta1/node_info)
node_info=$(curl -s -f zetacore0:1317/cosmos/base/tendermint/v1beta1/node_info)
if [[ $? == 0 ]]; then
echo "$node_info" | jq -r '.application_version.version'
return
version=$(echo "$node_info" | jq -r '.application_version.version')
# only return versions containing dots to avoid empty strings and "null"
if [[ "$version" == *.* ]]; then
echo "$version"
return
fi
fi
sleep 1
done
Expand Down Expand Up @@ -132,13 +136,13 @@ if [ "$LOCALNET_MODE" == "upgrade" ]; then

NEW_VERSION=$(get_zetacored_version)

echo "upgrade result: ${OLD_VERSION} -> ${NEW_VERSION}"

if [[ "$OLD_VERSION" == "$NEW_VERSION" ]]; then
echo "version did not change after upgrade height, maybe the upgrade did not run?"
exit 2
fi

echo "upgrade complete: ${OLD_VERSION} -> ${NEW_VERSION}"

# wait for zevm endpoint to come up
sleep 10

Expand Down

0 comments on commit 43e78b8

Please sign in to comment.