Skip to content

Limit multiple platform manifests to one for size check#3484

Merged
fuweid merged 1 commit intocontainerd:masterfrom
k3s-io:master
Aug 9, 2019
Merged

Limit multiple platform manifests to one for size check#3484
fuweid merged 1 commit intocontainerd:masterfrom
k3s-io:master

Conversation

@ibuildthecloud
Copy link
Copy Markdown
Contributor

@ibuildthecloud ibuildthecloud commented Aug 3, 2019

client.Pull will only pull one matching platform by default.
When checking the size of image we match that behavior so that
we don't look for multiple platforms that might not exist on disk.

Fixes #3387 and #2991

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Aug 3, 2019

Build succeeded.

@fuweid
Copy link
Copy Markdown
Member

fuweid commented Aug 3, 2019

@ibuildthecloud thanks for the fix. But we still need sign-it-off with your real name :P

Comment thread images/image.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This change looks reasonable for me. But we need to know the other use cases, for example, someone uses platforms.All to get the sum of all the platforms. I am not sure this case is reasonable because we cannot use arm platform image content in linux/amd64 platform.

WDYT? @dmcgowan @stevvooe

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think maybe we need to distinguish here between image Size and Usage. Perhaps usage is what is really concerned about here and we should just be skipping any resource which cannot be found locally. If that is the case, if we just have a Size function which can determine the size of an image given a platform, that would error out if it cannot find the manifests, however I am not sure how useful that function is for anything except introspection. Likewise a usage function may want to account for snapshot usage as well as blob usage.

@dmcgowan
Copy link
Copy Markdown
Member

dmcgowan commented Aug 6, 2019

Can you please rebase (force it to use the fixed test config) and sign, I think this change is fine for now. I think a better solution would be more involved, but this change represents client expectations for getting the size from a pulled image.

client.Pull will only pull one matching platform by default.
When checking the size of image we match that behavior so that
we don't look for multiple platforms that might not exist on disk.

Signed-off-by: Darren Shepherd <[email protected]>
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Aug 8, 2019

Build succeeded.

@dmcgowan
Copy link
Copy Markdown
Member

dmcgowan commented Aug 8, 2019

LGTM, ignore Travis' red 'x' for now, it is from canceling ppc64le job

Copy link
Copy Markdown
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Pulling busybox on arm fails

4 participants