ci: poll for DNS recovery in cleanup, not test step

Move DNS recovery wait into the cleanup step (if: always) so it runs
regardless of test outcome. Use getent hosts loop instead of sleep+dig
to match what post-steps actually use for resolution.
This commit is contained in:
Razvan Dimescu
2026-04-17 01:11:20 +03:00
parent 99af97a67b
commit 34b75833b8

View File

@@ -93,13 +93,16 @@ jobs:
sudo ./target/release/numa uninstall sudo ./target/release/numa uninstall
sleep 1 sleep 1
! curl -sf http://127.0.0.1:5380/health 2>/dev/null ! curl -sf http://127.0.0.1:5380/health 2>/dev/null
# Wait for systemd-resolved to restore DNS so the runner can
# phone home to GitHub after the job completes.
sleep 3
dig @127.0.0.1 github.com +short +timeout=5 || dig github.com +short +timeout=5 || true
- name: cleanup - name: cleanup
if: always() if: always()
run: sudo ./target/release/numa uninstall 2>/dev/null || true run: |
sudo ./target/release/numa uninstall 2>/dev/null || true
# Wait for systemd-resolved to fully restore DNS so post-job
# steps (rust-cache upload, log shipping) can reach GitHub.
for i in $(seq 1 30); do
if getent hosts github.com >/dev/null 2>&1; then break; fi
sleep 1
done
integration-macos: integration-macos:
needs: [check-macos] needs: [check-macos]