Repository navigation
fix(sandbox): a VM logs in to the image store's registry before pulling an image by its digest - #746
Merged
Conversation
…ng an image by its digest
A bundle's image, registered by its digest in a private image store such as ECR, failed to pull on a VM sandbox
("no basic auth credentials") and was built from its build context on every deploy, since only the pull by name
logged in. The pull by digest now logs in to each registry the store holds credentials for first, as the pull by
name does; a registry it holds none for, GHCR's published images, is left alone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…its images, as a failed pull by digest does Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Part of FD-6064.
Why
agent-env bundle registerbuilds each image a bundle builds, pushes it to the configured image store, and records it by digest with its build context beside it. On a VM sandbox,load_docker_imagespulls such an image by digest (pull_published), but that path never logged in to the registry. Only the pull by name (pull_images) did.With a private image store such as ECR, every pull by digest failed, and the VM rebuilt the image from its build context on every deploy, without saying so. FD-5969's run on modal_vm hit this for both of the bundle's images:
FD-4709's bundles reference images in the delivery ECR by digest, which is the same path.
What changes
pull_publishedfirst logs in to each registry the image store holds credentials for, then pulls by digest.pull_images(by name), which has nothing to fall back on, still raises.pull_imagesintoVmSandbox._log_in, which both pulls use: one login per registry, and none for a registry the store holds no credentials for. GHCR's published infra images are pulled as before.Testing
docker loginto that registry, while a published image beside it logs in nowhere. It fails onmain.vm_sandbox_test.py: 64 passed.Couldn't pull … no basic auth credentialswarnings per deploy, and the items and shop images were built on the gateway VM.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; the previous login-failure issue is fixed.Summary
VM sandboxes log in before pulling images by digest.
Reviews (6) · Last reviewed commit: "fix(sandbox): a registry a VM can't log ..." · Reviewed by Greptile