-
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
Combining --output type=oci
and type=docker
results in invalid OCI image
#5556
Comments
@jedevc @a-palchikov Any idea what this is? |
@tonistiigi I'll look into this. |
Regarding the original issue - the problem is a known limitation of exporter responses (to be more precise - a single response for all exporters) when image exporters collide on the image descriptor (last write wins). So, the parallel export is sort of incomplete in this respect. I'll work on improving this. |
unfinished in the sense that exporter responses (which are abstracted as a map of key/value pairs) are combined into a single map at the end of the export: https://github.com/moby/buildkit/blob/55a7483b0564a7ad5b2ce5e62512789dce327bca/solver/llbsolver/solver.go#L808-L809 In order to provide the correct exporter response, each response (currently at least each container image exporter) needs to be dedicated to the exporter instance. To achieve this, assign and propagate exporter IDs from the client and have corresponding exporters annotate their responses with the respective ID so the client can order outputs per exporter instance. Fixes moby#5556.
unfinished in the sense that exporter responses (which are abstracted as a map of key/value pairs) are combined into a single map at the end of the export: https://github.com/moby/buildkit/blob/55a7483b0564a7ad5b2ce5e62512789dce327bca/solver/llbsolver/solver.go#L808-L809 In order to provide the correct exporter response, each response (currently at least each container image exporter) needs to be dedicated to the exporter instance. To achieve this, assign and propagate exporter IDs from the client and have corresponding exporters annotate their responses with the respective ID so the client can order outputs per exporter instance. Fixes moby#5556.
Looked into this as well and how it possibly relates to #5572 The workaround for this specific issue is changing @crazy-max Maybe switching to OCI mediatypes by default is ok for @LaurentGoderre FYI, this might have an impact on your efforts for returning more descriptors for build results as it is possible for different exporters to return different sets of descriptors. |
unfinished in the sense that exporter responses (which are abstracted as a map of key/value pairs) are combined into a single map at the end of the export: https://github.com/moby/buildkit/blob/55a7483b0564a7ad5b2ce5e62512789dce327bca/solver/llbsolver/solver.go#L808-L809 In order to provide the correct exporter response, each response (currently at least each container image exporter) needs to be dedicated to the exporter instance. To achieve this, assign and propagate exporter IDs from the client and have corresponding exporters annotate their responses with the respective ID so the client can order outputs per exporter instance. Fixes moby#5556.
unfinished in the sense that exporter responses (which are abstracted as a map of key/value pairs) are combined into a single map at the end of the export: https://github.com/moby/buildkit/blob/55a7483b0564a7ad5b2ce5e62512789dce327bca/solver/llbsolver/solver.go#L808-L809 In order to provide the correct exporter response, each response (currently at least each container image exporter) needs to be dedicated to the exporter instance. To achieve this, assign and propagate exporter IDs from the client and have corresponding exporters annotate their responses with the respective ID so the client can order outputs per exporter instance. Fixes moby#5556. Output descriptors in container image exporters with backwards-compatible fallbacks. Move the exporter set up to a public helper API so that users that custom-initialize the session can benefit from being able to configure exporters correctly. Remove ids from the exporter implementation further shifting the burden of managing exporter identities to the control/client so it can be unified and kept an implementation detail as much as possible. Implement support for multiple exporter responses in APIs. Signed-off-by: a-palchikov <[email protected]>
unfinished in the sense that exporter responses (which are abstracted as a map of key/value pairs) are combined into a single map at the end of the export: https://github.com/moby/buildkit/blob/55a7483b0564a7ad5b2ce5e62512789dce327bca/solver/llbsolver/solver.go#L808-L809 In order to provide the correct exporter response, each response (currently at least each container image exporter) needs to be dedicated to the exporter instance. To achieve this, assign and propagate exporter IDs from the client and have corresponding exporters annotate their responses with the respective ID so the client can order outputs per exporter instance. Fixes moby#5556. Output descriptors in container image exporters with backwards-compatible fallbacks. Move the exporter set up to a public helper API so that users that custom-initialize the session can benefit from being able to configure exporters correctly. Remove ids from the exporter implementation further shifting the burden of managing exporter identities to the control/client so it can be unified and kept an implementation detail as much as possible. Implement support for multiple exporter responses in APIs. Signed-off-by: a-palchikov <[email protected]>
unfinished in the sense that exporter responses (which are abstracted as a map of key/value pairs) are combined into a single map at the end of the export: https://github.com/moby/buildkit/blob/55a7483b0564a7ad5b2ce5e62512789dce327bca/solver/llbsolver/solver.go#L808-L809 In order to provide the correct exporter response, each response (currently at least each container image exporter) needs to be dedicated to the exporter instance. To achieve this, assign and propagate exporter IDs from the client and have corresponding exporters annotate their responses with the respective ID so the client can order outputs per exporter instance. Fixes moby#5556. Output descriptors in container image exporters with backwards-compatible fallbacks. Move the exporter set up to a public helper API so that users that custom-initialize the session can benefit from being able to configure exporters correctly. Remove ids from the exporter implementation further shifting the burden of managing exporter identities to the control/client so it can be unified and kept an implementation detail as much as possible. Implement support for multiple exporter responses in APIs. Signed-off-by: a-palchikov <[email protected]>
unfinished in the sense that exporter responses (which are abstracted as a map of key/value pairs) are combined into a single map at the end of the export: https://github.com/moby/buildkit/blob/55a7483b0564a7ad5b2ce5e62512789dce327bca/solver/llbsolver/solver.go#L808-L809 In order to provide the correct exporter response, each response (currently at least each container image exporter) needs to be dedicated to the exporter instance. To achieve this, assign and propagate exporter IDs from the client and have corresponding exporters annotate their responses with the respective ID so the client can order outputs per exporter instance. Fixes moby#5556. Output descriptors in container image exporters with backwards-compatible fallbacks. Move the exporter set up to a public helper API so that users that custom-initialize the session can benefit from being able to configure exporters correctly. Remove ids from the exporter implementation further shifting the burden of managing exporter identities to the control/client so it can be unified and kept an implementation detail as much as possible. Implement support for multiple exporter responses in APIs. Signed-off-by: a-palchikov <[email protected]>
unfinished in the sense that exporter responses (which are abstracted as a map of key/value pairs) are combined into a single map at the end of the export: https://github.com/moby/buildkit/blob/55a7483b0564a7ad5b2ce5e62512789dce327bca/solver/llbsolver/solver.go#L808-L809 In order to provide the correct exporter response, each response (currently at least each container image exporter) needs to be dedicated to the exporter instance. To achieve this, assign and propagate exporter IDs from the client and have corresponding exporters annotate their responses with the respective ID so the client can order outputs per exporter instance. Fixes moby#5556. Output descriptors in container image exporters with backwards-compatible fallbacks. Move the exporter set up to a public helper API so that users that custom-initialize the session can benefit from being able to configure exporters correctly. Remove ids from the exporter implementation further shifting the burden of managing exporter identities to the control/client so it can be unified and kept an implementation detail as much as possible. Implement support for multiple exporter responses in APIs. Signed-off-by: a-palchikov <[email protected]>
Create
Dockerfile
:Run:
Now examine the resulting image. First, the index:
Now, the blobs:
As you can see, the manifest referenced by the index is nowhere to be found. This makes the image invalid.
Version information:
For reference, if you omit
--output type=docker
from the original command, the index is different and references an existing blob:The text was updated successfully, but these errors were encountered: