Skip to content

remotecache: rebind registry cache sessions - #7047

Merged
tonistiigi merged 3 commits into
moby:masterfrom
tonistiigi:registry-cache-session-rebind
Aug 19, 2026
Merged

tonistiigi merged 3 commits into
moby:masterfrom
tonistiigi:registry-cache-session-rebind

Conversation

@tonistiigi

@tonistiigi tonistiigi commented Aug 17, 2026 •

Copy link
Copy Markdown
Member

replaces and closes #7037

Adds integration test for the regression

Registry cache imports keep layer content lazy. The resolver and fetcher used for the import were bound to the session of the Solve that read the cache manifest. Identical active vertices can be shared by concurrent jobs, and cache managers for the same registry ref are deduplicated. This can leave a provider created by build A in shared state after A exits, so a later lazy read from build B requests credentials from an inactive A session.

Make registry cache providers session-aware and propagate that behavior through descriptor pairs and multi-providers. Worker.FromRemote now binds descriptor handlers to the session group supplied by the lazy-read caller, and the registry fetcher is recreated from Resolver.WithSession for that group.

Keep direct cache-export behavior unchanged. Add an authenticated regression test that closes session A, starts session B with distinct credentials, and verifies that the lazy cache blob is fetched through B.

Signed-off-by: Eli Uriegas <eliuriegas@meta.com>
Signed-off-by: eliuriegas <eliuriegas@meta.com>
@crazy-max crazy-max added this to the v0.33.0 milestone Aug 18, 2026
Add an integration test that closes the cache import session before a lazy
registry layer is read. Verify the active build session supplies credentials.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tonistiigi
tonistiigi force-pushed the registry-cache-session-rebind branch from 0fffa17 to 2e2b4a4 Compare August 18, 2026 15:13

@seemethere seemethere left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@tonistiigi
tonistiigi merged commit 5ba4913 into moby:master Aug 19, 2026
198 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants