feat: pull images with layer progress, and pull again to update a tag #24
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/17-image-pull"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #17
What
name,name:tag,registry/owner/app:tagorname@sha256:…). While the pull runs, the dialog shows a progress bar and "n of m layers · X MB of Y MB". Hide keeps the pull running; the button then spins and reopens the progress. Stop drops the stream.Status:line.How (following Nye's notes on #17)
src/pull.rs:parse_refalways sends a tag (defaultlatest), because with no tag the engine pulls every tag of the repo. A:only starts a tag after the last/, solocalhost:5000/appkeeps its port. Digests go infromImagewith no tag.id), and done/current/total are summed. Podman sends no byte counts and no finalStatus:line, so the bar becomes indeterminate and a clean end of the stream counts as success. Progress signals go out at most every 150 ms.docker login.--mock: a made-up three-layer pull. New screenshot scenepull. Screenshots now grab the root item, so open dialogs show up in them.Tests
pulls_one_tag_and_reports_errors(ignored; it needs an engine and a registry, so run it withcargo test -- --ignored) passed on Docker 26 (dind). It checks "Pulled busybox:1.36", then "is up to date", that only that one tag came down, and that a missing tag gives a "not found" error.mock, build, and tests (14 + 17 pass).Stacked on #23 (
feat/12-networks).PR #24 (#17 image pull) review — Nye, at
04746bb— CHANGES REQUESTED (1 medium, 2 low)CI: green on the forge (run 949). Local check C4 passes: fmt, clippy -D warnings (with and without mock), 14 tests, mock build.
Findings (each has a proof script; it must pass after the fix)
once sizes arrive, the fill keeps the NumberAnimation's last x, so it starts part-way and overshoots.
Seen live on Podman 5.4: "305 MB of 407 MB" drawn from ~22% to ~97% (pr24/bar-offset.png).
Fix (verified passing with the proof): on the ProgressBar, add
onIndeterminateChanged: if (!indeterminate) contentItem.children[0].x = 0(or give the fill an id and reset it).Proof:
bash notes/pr24-f5-proof.sh <repo dir>(runs the PR's ProgressBar block in qml offscreen).The generic "Volume/image actions report back here" handler in Main.qml also receives every pull:* result:
it alerts on the cancel, and on success the toast fires twice. Real errors end up OK only because the pull
handler's alert happens to come last. Fix:
if (key.startsWith("pull:")) returnat the top of the generic handler.Proof:
bash notes/pr24-f4-proof.sh <repo dir>.cargo test pulls_one_tag -- --ignoredfails on aDocker that already has busybox:latest and busybox:1.37 (asserts <=2 busybox tags total), and on Podman the
re-pull says "Pulled busybox:1.36" (no Status line). Also it removes the dev's own busybox:1.36 first.
Fix: list busybox tags before, assert exactly {busybox:1.36} is new after; accept either outcome text on the
re-pull (or only assert "up to date" when the engine is Docker). Proof:
bash notes/pr24-f3-proof.sh.Checked and fine
unknown…"; private/missing repo "pull access denied for …, may require 'docker login'…"; ghcr "…denied".
Podman bad tag: "manifest unknown: manifest unknown" (title names the ref, so OK).
at 35 MB, nothing left) and Podman 5.4 (node:22-bookworm aborted, no image). The "engine may finish it anyway"
comment on cancelPull is overcautious; fine to keep.
indeterminate only while nothing is known. parse_ref handles registry ports, digests, bad input.
Non-blocking
Screenshots: bar offset on Podman, Stop alert
Posted by Upper Wolfjaw for Nye (Nye can't comment here).
04746bbed61848c376d7Fixed in
1848c37(amended, rebased on #23 ate40fcdb):onIndeterminateChanged), so it draws from the left.pull:keys, so Stop shows no alert and success toasts once.pulls_one_tag_and_reports_errorscompares busybox tags before and after (exactly one new tag), no longer deletes a developer's own busybox:1.36, and accepts Podman's "Pulled …" on the re-pull.Local CI (fmt, clippy both, build, tests both) green; all three proofs pass.
1848c376d771201e8e4c