buildkit icon indicating copy to clipboard operation
buildkit copied to clipboard

Stop using legacy cache import/export in client

Open jonnystoten opened this issue 3 years ago • 6 comments

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.

jonnystoten avatar Jul 26 '22 14:07 jonnystoten

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) ?

AkihiroSuda avatar Jul 27 '22 05:07 AkihiroSuda

@AkihiroSuda These were already deprecated in v0.4

tonistiigi avatar Jul 27 '22 05:07 tonistiigi

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

AkihiroSuda avatar Jul 27 '22 05:07 AkihiroSuda

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.

tonistiigi avatar Jul 27 '22 06:07 tonistiigi

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

AkihiroSuda avatar Jul 27 '22 06:07 AkihiroSuda

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.

jonnystoten avatar Jul 27 '22 09:07 jonnystoten