Repository navigation
fix(watcher): treat locally built images as local under the containerd image store - #1512
Merged
Merged
Conversation
…d image store Fixes #1506. The containerd store reports name@digest in RepoDigests for every named image, local or pulled (moby collectRepoTagsAndDigests), so RepoDigests cannot tell them apart. On Engine API 1.53+ inspect carries Identity: a non-empty Pull means pulled, an Identity without Pull (Build or Signature only) means local, and no Identity on a containerd-store image (Descriptor present) means never pulled. Older APIs and the classic store keep the empty-RepoDigests rule.
scttbnsn
requested review from
ALARGECOMPANY and
biggest-littlest
as code owners
October 29, 2026 01:32
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 9 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Oct 29, 2026
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.
Fixes #1506.
With Docker's containerd image store, a locally built image gets a
RepoDigestsentry (myapp@sha256:...). drydock only treated an image as local whenRepoDigestswas empty, so it missed these and looked them up on Docker Hub every scan, logging a 401 each time.Under the containerd store, moby builds
RepoDigestsasname@digestfor every named image, pulled or not (daemon/containerd/image_inspect.go), so that list can't tell them apart. What can is theIdentityfield image inspect returns from API 1.53. It listsPullsources from the distribution-source labels a pull leaves behind, andBuildrefs for local builds (daemon/containerd/image_identity.go).The new
docker-image-origin.tsdecides in this order:Identity.Pullhas entries: pulled.Identitypresent with noPull: local.Identity, butDescriptoris present (containerd store) on API 1.53 or newer: never pulled, so local. This coversdocker load.RepoDigestsrule, unchanged.The API version comes from the version drydock already pins for socket watchers, or one cached
version()call for remote hosts, and only when rule 3 needs it.Local images still show in the UI. They just skip the registry lookup, same as on the classic store.
Tests cover inspect fixtures for a containerd local build, pull and load, containerd on API 1.52, and classic local and pulled.