From bd88be2b41a736d9e9732d64b423a37c169211b1 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 19 Mar 2024 15:46:56 -0700 Subject: [PATCH 1/2] ci: widen slack-github-action version for Node 20 compat --- .github/actions/notify-status/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/notify-status/action.yml b/.github/actions/notify-status/action.yml index 1aef6362..e7b1cc7a 100644 --- a/.github/actions/notify-status/action.yml +++ b/.github/actions/notify-status/action.yml @@ -43,7 +43,7 @@ runs: from: ${{ inputs.from }} - name: Send GitHub trigger payload id: slack - uses: slackapi/slack-github-action@v1.24.0 + uses: slackapi/slack-github-action@v1 with: payload: | { From 1a0becbd493251d6ec355d7235d242673d48c01d Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 8 Mar 2024 13:55:21 -0800 Subject: [PATCH 2/2] fix: wait for agd to stop if it's running --- .../public/upgrade-test-scripts/env_setup.sh | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/packages/synthetic-chain/public/upgrade-test-scripts/env_setup.sh b/packages/synthetic-chain/public/upgrade-test-scripts/env_setup.sh index fc0fb2b2..131a22ad 100755 --- a/packages/synthetic-chain/public/upgrade-test-scripts/env_setup.sh +++ b/packages/synthetic-chain/public/upgrade-test-scripts/env_setup.sh @@ -60,12 +60,31 @@ if [[ "$binary" == "agd" ]]; then sed -i 's/minSubmissionCount": 3/minSubmissionCount": 1/g' "$configdir"/*.json fi +# XXX race conditions between build stages +await_agd_startable() { + local retries="$1" + + local wait="10s" + + if agd status >/dev/null 2>&1; then + # agd is running + if [[ $retries -gt 0 ]]; then + echo "Waiting $wait for agd to stop" + sleep $wait + + await_agd_startable $((retries - 1)) + else + echo "Cannot start agd because it's already running" + return 1 + fi + fi +} + startAgd() { echo "startAgd()" - # XXX debugging https://github.com/Agoric/agoric-3-proposals/issues/93 - apt install net-tools - netstat + # precondition check + await_agd_startable 10 agd start --log_level warn "$@" & AGD_PID=$!