Skip to content

Improve Docker daemon diagnostics for local flowctl runs#3001

Open
RitwijParmar wants to merge 1 commit into
estuary:masterfrom
RitwijParmar:codex/docker-daemon-diagnostics
Open

Improve Docker daemon diagnostics for local flowctl runs#3001
RitwijParmar wants to merge 1 commit into
estuary:masterfrom
RitwijParmar:codex/docker-daemon-diagnostics

Conversation

@RitwijParmar

Copy link
Copy Markdown

Summary

Fixes #2969 by detecting Docker daemon/connectivity failures from docker stderr even when the Docker CLI exits successfully.

Docker Desktop on macOS can return status 0 while writing the real daemon failure to stderr. Before this change, flowctl preview / flowctl catalog test could continue into docker inspect parsing and surface a misleading error like:

failed to parse `docker inspect` output: []

This now returns an actionable message telling the user to start Docker Desktop or their configured container runtime, with a note about DOCKER_CLI=podman.

What changed

  • Adds docker_cmd_output in both runtime paths:
    • crates/runtime/src/container.rs
    • crates/runtime-next/src/container.rs
  • Classifies daemon-unavailable stderr before checking exit status, covering the macOS case where Docker exits 0 but writes Cannot connect to the Docker daemon....
  • Preserves existing behavior for ordinary non-daemon Docker failures.
  • Adds snapshot regression tests in both crates for:
    • daemon unavailable with successful exit status and [] stdout
    • non-daemon Docker command failure passthrough
  • Documents the Docker/container-runtime prerequisite for local flowctl preview and flowctl catalog test workflows in crates/flowctl/README.md.

Validation

Passed locally:

cargo fmt --check
cargo test -p runtime docker_cmd_ --lib
cargo test -p runtime-next docker_cmd_ --lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flowctl: clearer error when Docker daemon isn't running

1 participant