-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
allow exporting cache metadata in the image config #777
Conversation
b2e1583
to
3dd50bb
Compare
SGTM |
3dd50bb
to
b6a4965
Compare
FIxed some issues, changed to base64 of json and added tests. Also added more logic for cache stability: walking back unused remote keys for exporting, keeping description on non-dockerfile, and copying matched remote record with the cache of the parent layers. There is still a case where unused keys are not copied to the local store on match, but it is tricky to add that because of the incompatibility between remote format and internal cache keys. The remote format includes output index in digest while cache keys keep it separate meaning we can only convert one way. It should be possible to match them but keeping existing keys might be complicated. This seems low priority atm.
|
b6a4965
to
eeee184
Compare
LGTM after rebase Can we release |
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
eeee184
to
5434a42
Compare
@AkihiroSuda There are couple of issues still in the milestone (can you take #774?). Don't think we need betas atm unless you have some specific idea where to test it. In case of a big PR like this(or local type) lets just wait for couple of days after a merge. |
digests = append(digests, desc.Digest) | ||
} | ||
|
||
if _, err := res.CacheKeys()[0].Exporter.ExportTo(ctx, e, solver.CacheExportOpt{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is CacheKeys()
guaranteed to return more than one entries?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if multiple keys are returned they all share the exporter https://github.com/moby/buildkit/blob/master/solver/edge.go#L871
fixes #752
based on #615
Exporting with
--export-cache type=inline
importing is connected with the regular registry importer that falls back to inline if the registry ref is not a special cache manifest.TODO: