push: inherit distribution sources from parent#9029
Conversation
|
Marking this a cherry-pick for 1.6 and 1.7, although we could skip cherry-picking the ctr commit. The push change could be considered a bug fix since the current behavior is not correct. |
thaJeztah
left a comment
There was a problem hiding this comment.
overall looks good; I left a suggestion for the new interface that's designed; happy to hear what you think.
Signed-off-by: Derek McGowan <derek@mcg.dev>
Signed-off-by: Derek McGowan <derek@mcg.dev>
When a blob does not exist locally, rather than erroring on info lookup, inherit the parent distribution sources. Push is able to succeed even if the blob does not exist locally when a cross repository mount is done. This is a common operation pushing a multi-platform image to the same registry but different namespace. Signed-off-by: Derek McGowan <derek@mcg.dev>
The metadata is small and useful for viewing all platforms for an image and enabling push back to the same registry. Signed-off-by: Derek McGowan <derek@mcg.dev>
a6acfa4 to
b32638e
Compare
|
Could you please help me understand why do we need to introduce the |
It is to make |
|
/cherrypick release/1.6 |
|
@samuelkarp: #9029 failed to apply on top of branch "release/1.6": DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@samuelkarp opened a manual cherry-pick: #9453 |
When a blob does not exist locally, rather than erroring on info lookup, inherit the parent distribution sources. Push is able to succeed even if the blob does not exist locally when a cross repository mount is done. This is a common operation pushing a multi-platform image to the same registry but different namespace.
This gets around a premature not found error on push when looking up the source labels. The push API was not designed to abort push so early in the process, any not found should only error the process when coming from the content open.
Update the ctr defaults to something more sensible, this reduces the number of user errors on push after pull.