Repository navigation
feat(push): add --ignore-missing to skip images not available locally - #14341
Conversation
`push --ignore-push-failures` ignores every push error, including authentication and registry failures, which can hide real problems when the only expectation is that some services have not been built. Add `--ignore-missing`, which skips an image that is not in the local image store and still fails on any other error. It is independent of `--ignore-push-failures`, whose behavior is unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
The dry-run client fakes ImageInspect for some callers, picked by the name of the calling function, and fakes the push of an image. Nothing tied --ignore-missing to the real state of the local image store in dry-run. Check that a missing image is skipped from what the engine really holds, that the other images get the faked push, and that nothing is pushed nor looked up in a registry for the skipped ones. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
docker-agent
left a comment
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
ndeloof
left a comment
There was a problem hiding this comment.
LGTM. Only NotFound is skipped: any other error from ImageInspect leaves the push to report it, which is what makes this different from --ignore-push-failures. The dry-run test checking that the inspection hits the real engine is a nice touch, and push.go had no test before.
Non-blocking suggestion: when every image is skipped, the command exits 0 without pushing anything and, with --quiet, prints nothing at all. A summary (e.g. "N images skipped") or a warning when nothing was pushed would make that case easier to spot in CI logs.
Drafted with Claude Code; read and validated before posting.
What I did
Add
docker compose push --ignore-missing: images that are not in the local image store are skipped (reported asSkipped) instead of failing the push. Any other error still fails the command.--ignore-push-failuresignores every error, including authentication and registry ones, which hides real problems when the only expectation is that some services were never built.--ignore-missingcovers that case on its own, and--ignore-push-failuresis unchanged.publishand the classicbuild --pushdo not set the new option, so they behave as before.Related issue
Closes #7431
🤖 Generated with Claude Code