Skip to content

Commit 43e78b8

Browse files
authored
fix(e2e): improve upgrade version logic (#2544)
* fix(e2e): improve upgrade version logic * fix mainnet import timeout
1 parent a27aa9a commit 43e78b8

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.github/workflows/e2e.yml

+2
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ jobs:
145145
- make-target: "start-upgrade-import-mainnet-test"
146146
runs-on: buildjet-16vcpu-ubuntu-2204
147147
run: ${{ needs.matrix-conditionals.outputs.UPGRADE_IMPORT_MAINNET_TESTS == 'true' }}
148+
timeout-minutes: 40
148149
- make-target: "start-e2e-admin-test"
149150
runs-on: ubuntu-20.04
150151
run: ${{ needs.matrix-conditionals.outputs.ADMIN_TESTS == 'true' }}
@@ -154,6 +155,7 @@ jobs:
154155
- make-target: "start-e2e-import-mainnet-test"
155156
runs-on: buildjet-16vcpu-ubuntu-2204
156157
run: ${{ needs.matrix-conditionals.outputs.STATEFUL_DATA_TESTS == 'true' }}
158+
timeout-minutes: 40
157159
- make-target: "start-tss-migration-test"
158160
runs-on: ubuntu-20.04
159161
run: ${{ needs.matrix-conditionals.outputs.TSS_MIGRATION_TESTS == 'true' }}

contrib/localnet/orchestrator/start-zetae2e.sh

+9-5
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@ get_zetacored_version() {
99
retries=10
1010
node_info=""
1111
for ((attempt=1; attempt<=$retries; attempt++)); do
12-
node_info=$(curl -s zetacore0:1317/cosmos/base/tendermint/v1beta1/node_info)
12+
node_info=$(curl -s -f zetacore0:1317/cosmos/base/tendermint/v1beta1/node_info)
1313
if [[ $? == 0 ]]; then
14-
echo "$node_info" | jq -r '.application_version.version'
15-
return
14+
version=$(echo "$node_info" | jq -r '.application_version.version')
15+
# only return versions containing dots to avoid empty strings and "null"
16+
if [[ "$version" == *.* ]]; then
17+
echo "$version"
18+
return
19+
fi
1620
fi
1721
sleep 1
1822
done
@@ -132,13 +136,13 @@ if [ "$LOCALNET_MODE" == "upgrade" ]; then
132136

133137
NEW_VERSION=$(get_zetacored_version)
134138

139+
echo "upgrade result: ${OLD_VERSION} -> ${NEW_VERSION}"
140+
135141
if [[ "$OLD_VERSION" == "$NEW_VERSION" ]]; then
136142
echo "version did not change after upgrade height, maybe the upgrade did not run?"
137143
exit 2
138144
fi
139145

140-
echo "upgrade complete: ${OLD_VERSION} -> ${NEW_VERSION}"
141-
142146
# wait for zevm endpoint to come up
143147
sleep 10
144148

0 commit comments

Comments
 (0)