Skip to content

Commit 2fd892b

Browse files
committed
refresh-data: wait for hallpass before smoke test
The restart-poll loop exits as soon as Fly reports state=started, which only means VM init is running — hallpass may not have bound :22 yet. Run 26282389917 saw state=started on poll attempt 1 and the next step's `flyctl ssh console` got "connection refused" <1s later. Add a no-op SSH-liveness probe loop between restart-poll and smoke test, capped at ~60s.
1 parent 8565660 commit 2fd892b

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/refresh-data.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,29 @@ jobs:
219219
exit 1
220220
fi
221221
222+
- name: Wait for SSH (hallpass) on staging
223+
env:
224+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
225+
run: |
226+
# `state=started` from Fly means the VM init is up — it does not
227+
# guarantee that hallpass (the SSH daemon on :22) has finished
228+
# binding. Probe with a no-op `flyctl ssh console -C true` until
229+
# it succeeds; otherwise the very next step races hallpass and
230+
# gets "connection refused" (seen on run 26282389917 where
231+
# `state=started` was true on poll attempt 1, leaving no dwell
232+
# time). Cap at ~60s.
233+
MID="${{ steps.mach.outputs.id }}"
234+
for i in $(seq 1 30); do
235+
if flyctl ssh console --app "$FLY_APP" --machine "$MID" \
236+
-C "true" >/dev/null 2>&1; then
237+
echo " ssh ready on attempt $i"
238+
break
239+
fi
240+
echo " attempt $i: ssh not ready"
241+
sleep 2
242+
done
243+
flyctl ssh console --app "$FLY_APP" --machine "$MID" -C "true"
244+
222245
- name: Smoke test datasette on staging
223246
env:
224247
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

0 commit comments

Comments
 (0)