Repository navigation
fix(container): Refactor container registry auth client - #9368
Merged
Merged
Conversation
β¦and surface pull errors
β¦s pass on Windows
π§ͺ Hands-on test: No problems observed in 8 scenariosCommit Scenarios
π€ Automated hands-on test β not a review approval Β· model claude-opus-5.5 Β· Kiro kiro-cli 2.33.1 Β· build History (1)
|
vicheey
marked this pull request as ready for review
October 23, 2026 22:44
roger-zhangg
approved these changes
Oct 23, 2026
seshubaws
approved these changes
Oct 23, 2026
vicheey
enabled auto-merge (squash)
October 23, 2026 23:36
vicheey
disabled auto-merge
October 23, 2026 23:37
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.
Which issue(s) does this change fix?
Follow-up to #9366 (CI-side fix).
Why is this change necessary?
With Finch, SAM CLI can pull images without registry credentials even after
finch login, hits registry rate limits (429), and shows a misleading404 β¦ no such image.finch loginwrites~/.finch/config.json(or$DOCKER_CONFIG), but docker-py only reads the Docker config.sudo/setuidfinch logincan leave~/.docker/config.jsonroot-owned; docker-py silently treats an unreadable config as missing.How does it address the issue?
ContainerClientloads registry credentials at creation, so pulls, builds and pushes authenticate the same way. Finch on macOS loads$DOCKER_CONFIG/config.jsonor~/.finch/config.jsonvia docker-py's publicreload_config; Docker and Finch on Linux keep docker-py's default behavior.ContainerClient.pull_image()/pull_image_and_wait()raise on rejected pulls and on errors reported in the stream. Used byContainerManagerand the durable functions emulator.UserExceptionwithwrapped_fromfor metrics.finch loginguidance to Finch pull failures that look like auth, not-found or rate-limit errors.credsStore/credHelpershelper logs a warning and the pull retries anonymously.ContainerImagePullFailedException(moved tosamcli/local/docker/exceptions.py),ContainerCreationFailedException, private attributes, and user-facing messages ("container image").What side effects does this change have?
DockerImagePullFailedExceptionandDockerContainerCreationFailedExceptionare renamed; no external users were found.Mandatory Checklist
PRs will only be reviewed after checklist is complete
make prpassesmake update-reproducible-reqsif dependencies were changedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.