Repository navigation
fix: cache registry image metadata - #13341
Merged
Merged
Conversation
Add an integration test with a counting OCI registry that serves a small tagged image and records manifest/config fetches. The test runs two sequential sessions against one nested engine and asserts that tag revalidation uses HEADs while manifest/config metadata is downloaded only once. Signed-off-by: Solomon Hykes <[email protected]>
dagger-codex
Bot
force-pushed
the
codex/manifest-cache-regression-test
branch
from
June 5, 2026 22:07
ab0708e to
b46c011
Compare
Store resolved image manifests and configs in the engine content store during default registry resolution. This lets canonical config resolution and later pulls reuse metadata after tag revalidation instead of issuing repeated manifest and config GETs. Signed-off-by: Solomon Hykes <[email protected]>
dagger-codex
Bot
force-pushed
the
codex/manifest-cache-regression-test
branch
from
June 5, 2026 22:29
b46c011 to
a1c9dbe
Compare
Signed-off-by: Solomon Hykes <[email protected]>
sipsma
approved these changes
Jun 5, 2026
social4hyq
pushed a commit
to social4hyq/homebrew-core
that referenced
this pull request
Sep 20, 2026
dagger 0.21.5 Created-by: HarmonybrewBot Commit-by: HarmonybrewBot Merged-by: HarmonybrewBot Description: Created by `brew bump` --- Created with `brew bump-formula-pr`.<details> <summary>release notes</summary> <pre>## v0.21.5 - 2026-06-10 ### Added - Added expand option to container.exists by @alexcb in dagger/dagger#13310 - Support both Dang v1 and v2, routed by module engineVersion by @vito in dagger/dagger#13388 ### Changed - Prune local cache during disk pressure by @sipsma in dagger/dagger#13375 - Persist trivial core objects by @sipsma in dagger/dagger#13387 ### Fixed - Correct namespaced type-name mangling and cross-dependency interface dispatch in Dang by @vito in dagger/dagger#13377 - Surface exec errors correctly on the Bun runtime in the TypeScript SDK by @marcosnils in dagger/dagger#13395 - Ignore host xattrs for local filesync import identity by @sipsma in dagger/dagger#13389 - Don't shallow-clone the user's repo for git telemetry labels by @marcosnils in dagger/dagger#13363 - Preserve pending lazy container parents by @sipsma in dagger/dagger#13365 - Preserve withChanges parent layers by @dagger-codex[bot] + @shykes in dagger/dagger#13342 - Treat incomplete image metadata as cache miss by @sipsma in dagger/dagger#13346 - Cache registry image metadata by @dagger-codex[bot] + @shykes in dagger/dagger#13341 - Don't require id field for interface conformance in Dang by @vito in dagger/dagger#13318 - Use module-local check names for scale-out by @dagger-codex[bot] + @tiborvass in dagger/dagger#13329 - Fix snapshot owner lease attach/remove race by @sipsma in dagger/dagger#13321 - Follow source symlinks when copying directory contents in layercopy by @marcosnils in dagger/dagger#13326 ### What to do next? - Read the [documentation](https://docs.dagger.io) - Join our [Discord server](https://discord.gg/dagger-io) - Follow us on [Twitter](https://twitter.com/dagger_io) </pre> <p>View the full release notes at <a href="https://github.com/dagger/dagger/releases/tag/v0.21.5">https://github.com/dagger/dagger/releases/tag/v0.21.5</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!11205
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.
Summary
Cache registry image manifest/config metadata in the engine content store after tag resolution so repeated
container.from("tag")calls do not re-download the same metadata across canonical resolution, lazy pull, and later sessions.The resolver still revalidates tag refs with registry
HEADrequests. If the tag now points at a new digest, the new manifest/config metadata is fetched and stored, so this avoids repeated metadataGETs without over-caching mutable tags.Details
Before this change, the current resolver path rebuilt short-lived containerd resolvers/fetchers for
ResolveImageConfigand later pull work. Even when the tag digest had not changed, the same manifest and config could be fetched repeatedly instead of being reused from the engine-wide content store. On registries like Docker Hub, duplicate manifestGETs are the request class most likely to affect pull quotas.This adds a metadata-only resolver path that:
This does not reintroduce BuildKit's shared resolver/auth pool. Auth/token behavior remains per current resolver/session behavior.
Tests
go test ./core/integration -run '^$'dagger --progress=plain call go lint --include core/integration/container_registry_cache_test.godagger --progress=plain call engine-dev test --pkg ./core/integration --run='TestContainer/TestFromTagCachesManifestMetadataAcrossSessions'The focused integration test uses a mutable counting OCI registry. It verifies:
HEAD;Observed final local counts after the tag update:
CI
test-split:test-containerpasses on the pushed head.