Skip to content

client: allow configuring exporter content store #6045

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 24, 2025

Conversation

jedevc
Copy link
Member

@jedevc jedevc commented Jun 23, 2025

This just configures SolveOpt so that we can directly pass a containerd store through to an exporter (similar to how we do for OCIStores). No change in the protocol is needed, and all previous calls to Solve should still be valid.

Comment on lines +205 to +210
// TODO: this should be dependent on the exporter id (to allow multiple oci exporters)
storeName := "export"
if _, ok := contentStores[storeName]; ok {
return nil, errors.Errorf("oci store key %q already exists", storeName)
}
contentStores[storeName] = store
Copy link
Member Author

Choose a reason for hiding this comment

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

While here, noticed that we create one export key. If a user attempts to use multiple exporters, then we'll accidentally write to whichever the most recent store is.

I've added an explicit error case, and added a note of how this should be improved in the future (but will require a bit of editing on the exporter side as well), so leaving that for future work.

Copy link
Member

@tonistiigi tonistiigi left a comment

Choose a reason for hiding this comment

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

Check the CI

Signed-off-by: Justin Chadwell <me@jedevc.com>
@jedevc jedevc force-pushed the solveopt-exporter-store branch from ed2ab8a to dce5cac Compare June 24, 2025 10:18
@jedevc jedevc requested a review from tonistiigi June 24, 2025 10:19
@tonistiigi tonistiigi merged commit edfba12 into moby:master Jun 24, 2025
139 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.

2 participants