fix: check Docker availability before falling back to local Dagger engine (#329) #333

Merged
guettlibot merged 1 commits from issue-329-fix into main 2026-05-29 21:19:16 +00:00
guettlibot commented 2026-05-29 20:38:04 +00:00 (Migrated from codeberg.org)

Root cause

Run #977 failed because the remote Dagger server (DAGGER_STUNNEL_URL) was unreachable. setup_dagger_remote.sh probed it 5 times (2+ minutes), then exited 0 with:

"Remote engine unavailable — CI will use the local Dagger engine."

But the CI runner had no Docker daemon running, so the subsequent dagger call failed immediately with a confusing dial unix /var/run/docker.sock: connect: no such file or directory error — not the clear "no engine" message it should have been.

Fix

After all remote probe attempts fail, check whether docker info succeeds before claiming the local engine is usable. If Docker is also unavailable, exit 1 immediately with an actionable error message.

This makes the failure fast and obvious rather than delayed and cryptic.

Test plan

  • Script shellcheck passes (verified locally)
  • Pre-commit hooks pass (verified locally — all green)
  • CI run with remote engine available: unaffected path (probe succeeds, no Docker check needed)
  • CI run with remote down + Docker available: falls back to local engine as before
  • CI run with remote down + Docker missing: exits 1 with clear error at setup step

🤖 Generated with Claude Code

## Root cause Run #977 failed because the remote Dagger server (`DAGGER_STUNNEL_URL`) was unreachable. `setup_dagger_remote.sh` probed it 5 times (2+ minutes), then exited **0** with: > "Remote engine unavailable — CI will use the local Dagger engine." But the CI runner had no Docker daemon running, so the subsequent `dagger call` failed immediately with a confusing `dial unix /var/run/docker.sock: connect: no such file or directory` error — not the clear "no engine" message it should have been. ## Fix After all remote probe attempts fail, check whether `docker info` succeeds before claiming the local engine is usable. If Docker is also unavailable, exit 1 immediately with an actionable error message. This makes the failure fast and obvious rather than delayed and cryptic. ## Test plan - [ ] Script shellcheck passes (verified locally) - [ ] Pre-commit hooks pass (verified locally — all green) - [ ] CI run with remote engine available: unaffected path (probe succeeds, no Docker check needed) - [ ] CI run with remote down + Docker available: falls back to local engine as before - [ ] CI run with remote down + Docker missing: exits 1 with clear error at setup step 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.