c8d/push: Set distribution source recursively
After a successful push, all pushed blobs should have a distribution.source label pointing to the new registry. Before this commit, the label was only appended to the top-level blob (manifest or manifest list). Adjust this to also do that recursively to its children. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
parent
44dbbeb196
commit
488559a330
1 changed files with 2 additions and 1 deletions
|
@ -182,7 +182,8 @@ func appendDistributionSourceLabel(ctx context.Context, realStore content.Store,
|
|||
return
|
||||
}
|
||||
|
||||
if err := containerdimages.Dispatch(ctx, appendSource, nil, target); err != nil {
|
||||
handler := presentChildrenHandler(realStore, appendSource)
|
||||
if err := containerdimages.Dispatch(ctx, handler, nil, target); err != nil {
|
||||
// Shouldn't happen, but even if it would fail, then make it only a warning
|
||||
// because it doesn't affect the pushed data.
|
||||
log.G(ctx).WithError(err).Warn("failed to append distribution source labels to pushed content")
|
||||
|
|
Loading…
Add table
Reference in a new issue