Skip to content

Show progress while pulling the runner image - #33

Merged
clroot merged 1 commit into
mainfrom
image-pull-progress
Nov 19, 2026
Merged

clroot merged 1 commit into
mainfrom
image-pull-progress

Conversation

@clroot

@clroot clroot commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Closes #32

Problem

runnerctl image pull discarded docker pull stdout, so nothing was printed until the pull finished (up to the 600 s timeout).

Change

  • Print Pulling <image>... and forward docker pull stdout to runnerctl's stderr. stdout still carries only the result JSON.
  • Docker draws progress bars when stderr is a terminal and prints per-layer lines otherwise.
  • Add -q/--quiet to hide the progress.

Verification

  • cargo fmt --check, cargo clippy --all-targets --locked -- -D warnings, cargo test --locked
  • Fresh tag, non-TTY: runnerctl image pull --image ghcr.io/clroot/runnerctl-runner:v0.4.3 > out.json 2> pull.log → out.json has only the JSON, pull.log has the per-layer log
  • Fresh tag, stderr on a pty: Docker progress bars on stderr, JSON on stdout
  • Already-pulled image: runnerctl image pull 2>/dev/null | jq . returns the same JSON as before
  • --quiet: no stderr output, same JSON
  • Not run: Docker/GitHub checks from tests/README.md (runner lifecycle, container setup and auth unchanged), Windows

Send docker pull output to stderr instead of discarding it, so the
result JSON stays alone on stdout. Docker draws its progress bars when
stderr is a terminal and prints per-layer lines otherwise. Add --quiet
to hide the progress.

Closes #32
@clroot
clroot merged commit 6dfe5ef into main Nov 19, 2026
3 checks passed
@clroot
clroot deleted the image-pull-progress branch November 19, 2026 05:39
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.

runnerctl image pull에 진행률 표시

1 participant