Skip to content

Stop using legacy cache import/export in client - #2982

Merged
tonistiigi merged 3 commits into
moby:masterfrom
jonnystoten:remove-legacy-cache-options
Aug 26, 2022
Merged

Stop using legacy cache import/export in client#2982
tonistiigi merged 3 commits into
moby:masterfrom
jonnystoten:remove-legacy-cache-options

Conversation

@jonnystoten

Copy link
Copy Markdown
Contributor

Fixes #2974.

I've kept the server-side code for translating the legacy request for now so that this will continue to work with existing clients. We should be able to delete this once enough clients have been updated, perhaps in the following release?

I've also added some simple validation in the client for the ref attr on registry cache options, and some extra context around errors from the ResolveCacheExporterFuncs.

This also fixes the bug where registry cache options with a missing ref
would be silently discarded by the server-side component that turns the
legacy settings into the new settings.

Signed-off-by: Jonny Stoten <jonny.stoten@docker.com>
Signed-off-by: Jonny Stoten <jonny.stoten@docker.com>
Signed-off-by: Jonny Stoten <jonny.stoten@docker.com>

@tonistiigi tonistiigi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you also update the proto type to add indication that these fields have been removed. Eg. rename from "Deprecated" suffix to "Removed" or add comment.

@tonistiigi
tonistiigi requested a review from AkihiroSuda July 27, 2022 00:35
@AkihiroSuda

Copy link
Copy Markdown
Member

Could you also update the proto type to add indication that these fields have been removed. Eg. rename from "Deprecated" suffix to "Removed" or add comment.

Not "removed" yet (until vNextNext) ?

@tonistiigi

Copy link
Copy Markdown
Member

@AkihiroSuda These were already deprecated in v0.4

@AkihiroSuda

Copy link
Copy Markdown
Member

Yes, deprecated, but not removed and still in use by buildctl as of v0.10.x.

@tonistiigi

Copy link
Copy Markdown
Member

Yes, deprecated, but not removed and still in use by buildctl as of v0.10.x.

Isn't it only used when buildctl v0.10 is talking with v0.3 daemon. I don't think we care about that case.

@AkihiroSuda

Copy link
Copy Markdown
Member

Yes, deprecated, but not removed and still in use by buildctl as of v0.10.x.

Isn't it only used when buildctl v0.10 is talking with v0.3 daemon. I don't think we care about that case.

Doesn't seem so 😥

https://github.com/moby/buildkit/blob/v0.10.3/client/solve.go#L467-L475

@jonnystoten

Copy link
Copy Markdown
Contributor Author

Yes, my thinking is that we remove that stuff from the client first (this PR) and then after the next release we can remove the daemon-side usage and rename to "Removed" suffix.

@tonistiigi
tonistiigi merged commit 46c8b9e into moby:master Aug 26, 2022
emmanuelguerin pushed a commit to emmanuelguerin/buildkit that referenced this pull request Mar 31, 2025
Revert "vendor: docker, docker/cli v28.0.0-rc.1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

buildctl ignores/fails silently when ref is not specified in the export/import registry cache syntax

3 participants