Collapse Docker pull progress in non-TTY output - #365
Open
sdairs wants to merge 2 commits into
Open
Conversation
sdairs
force-pushed
the
issue-353-docker-pull-progress
branch
from
August 5, 2026 13:42
f4da4b9 to
ad6bd36
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves clickhousectl’s local Postgres Docker image pull reporting by collapsing noisy per-layer progress events into a single bounded summary line when output is non-interactive (non-TTY, JSON/agent/CI), while preserving detailed per-layer context for interactive terminals. This aligns local-command UX with the expectations in issue #353 and keeps Docker failure diagnostics intact.
Changes:
- Add a
PullReporterand progress-mode selection to switch between interactive (detailed) and collapsed (single-line) pull reporting. - Route local Postgres install/start image pulls through the new
docker::pull_image(..., structured_output)behavior (removing ad-hoceprintln!callers). - Add subprocess + unit tests validating collapsed non-TTY output and failure/diagnostic preservation.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/clickhousectl/src/local/docker.rs | Introduces interactive vs collapsed pull progress reporting and updates pull_image to emit bounded non-TTY output while keeping interactive detail. |
| crates/clickhousectl/src/local/mod.rs | Updates local Postgres install path to use the new pull_image(..., json) behavior instead of printing progress in the caller. |
| crates/clickhousectl/src/local/postgres.rs | Updates local Postgres start path to use the new pull_image(..., json) behavior when the image is missing. |
| crates/clickhousectl/tests/local_docker_pull_progress_test.rs | Adds subprocess coverage using a fake Docker socket to assert collapsed non-TTY output and preserved diagnostics on pull failure. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sdairs
force-pushed
the
issue-353-docker-pull-progress
branch
from
August 5, 2026 18:28
2f8c1e6 to
73fa2d4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #353
Summary
Tests
cargo fmt --allcargo test -p clickhousectl local::docker::testscargo test -p clickhousectl --test local_docker_pull_progress_testcargo test -p clickhousectlcargo clippy -p clickhousectl --all-targets -- -D warnings