Skip to content
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

Add OCI ref.name to unique key in remotes handler #5299

Merged
merged 1 commit into from
Apr 1, 2021

Conversation

estesp
Copy link
Member

@estesp estesp commented Apr 1, 2021

This allows a pusher to be used for more than one tag without creating a
new resolver/pusher. The current implementation checks the ref key
tracker status based on type and hash and will skip the push even if the
repository reference is unique.

Signed-off-by: Phil Estes estesp@amazon.com

Note: refkeys are visually used in ctr images pull for status, which will be impacted by this change, but many images do not use the OCI annotations at this point, so impact seems minimal; for example with this patch, you can see the official alpine image has no ref.name annotation so the output is unchanged:

$ sudo bin/ctr images pull
ctr: please provide an image reference to pull
docker.io/library/alpine:latest:                                                  resolved       |++++++++++++++++++++++++++++++++++++++|
index-sha256:ec14c7992a97fc11425907e908340c6c3d6ff602f5f13d899e6b7027c9b4133a:    done           |++++++++++++++++++++++++++++++++++++++|
manifest-sha256:e103c1b4bf019dc290bcc7aca538dc2bf7a9d0fc836e186f5fa34945c5168310: done           |++++++++++++++++++++++++++++++++++++++|
config-sha256:49f356fa4513676c5e22e3a8404aad6c7262cc7aaed15341458265320786c58c:   done           |++++++++++++++++++++++++++++++++++++++|
layer-sha256:ca3cd42a7c9525f6ce3d64c1a70982613a8235f0cc057ec9244052921853ef15:    done           |++++++++++++++++++++++++++++++++++++++|
elapsed: 0.9 s                                                                    total:  3.6 Ki (3.9 KiB/s)
unpacking linux/amd64 sha256:ec14c7992a97fc11425907e908340c6c3d6ff602f5f13d899e6b7027c9b4133a...
done: 71.951599ms

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 1, 2021

Build succeeded.

remotes/handlers.go Outdated Show resolved Hide resolved
This allows a pusher to be used for more than one tag without creating a
new resolver/pusher. The current implementation checks the ref key
tracker status based on type and hash and will skip the push even if the
repository reference is unique.

Signed-off-by: Phil Estes <estesp@amazon.com>
@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 1, 2021

Build succeeded.

Copy link
Member

@dmcgowan dmcgowan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@Zyqsempai Zyqsempai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@estesp estesp merged commit 251e3d1 into containerd:master Apr 1, 2021
@estesp estesp deleted the refkey-with-name branch April 1, 2021 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants