From 1816c629190514633dd99293b41d5c48bdab223c Mon Sep 17 00:00:00 2001 From: Nikola Petkovic Date: Thu, 8 Oct 2026 14:51:10 +0200 Subject: [PATCH] Retry the node health probe in the reusable deploy workflow `arch-kit health` samples the block height twice, 2 s apart, and fails when it did not move. A healthy chain still has multi-second gaps between blocks (3.5 s between heights 48004 and 48005 on internal-b at v0.12.0), so a single probe fails the whole deploy whenever it lands in one. prop-amm's deploy run 37778455694 died this way on a chain producing ~9 blocks/s. Probe up to five times, 10 s apart, and fail only when every probe sees a stalled chain. The per-repo adapters already do this; this brings the reusable workflow in line with them. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/deploy-program.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-program.yml b/.github/workflows/deploy-program.yml index f343cdc..3870999 100644 --- a/.github/workflows/deploy-program.yml +++ b/.github/workflows/deploy-program.yml @@ -226,7 +226,21 @@ jobs: env: RPC_URL: ${{ inputs.rpc-url }} BITCOIN_NETWORK: ${{ inputs.bitcoin-network }} - run: arch-kit --rpc-url "${RPC_URL}" --bitcoin-network "${BITCOIN_NETWORK}" health + # `health` samples the block height twice, 2 s apart, and fails when it + # did not move. A healthy chain still has multi-second gaps between + # blocks (3.5 s observed on internal-b at v0.12.0), so one probe that + # lands in such a gap must not fail the deploy. Five probes 10 s apart + # fail only when the chain is actually stalled. + run: | + for attempt in 1 2 3 4 5; do + if arch-kit --rpc-url "${RPC_URL}" --bitcoin-network "${BITCOIN_NETWORK}" health; then + exit 0 + fi + echo "health probe ${attempt}/5 failed; retrying in 10 s" >&2 + sleep 10 + done + echo "::error::Arch node at ${RPC_URL} failed the health probe 5 times" >&2 + exit 1 - name: Deploy program and IDL env: