Skip to content

images: only fetch the best matched manifest info#3406

Merged
crosbymichael merged 1 commit intocontainerd:masterfrom
fuweid:me-update-Manifest
Jul 16, 2019
Merged

images: only fetch the best matched manifest info#3406
crosbymichael merged 1 commit intocontainerd:masterfrom
fuweid:me-update-Manifest

Conversation

@fuweid
Copy link
Copy Markdown
Member

@fuweid fuweid commented Jul 13, 2019

When client uses Pull action to pull image, it will limit the number of
manifest as one. But Unpack action will call Manifest to traverse all
the manifests including non-dowloaded one. If the platform has more than
one manifest, the Pull with unpack action will fail. And also, there is
no need to read non-best matched manifest. Therefore, the Manifest can
do the sort earlier.

Signed-off-by: Wei Fu [email protected]

When client uses Pull action to pull image, it will limit the number of
manifest as one. But Unpack action will call Manifest to traverse all
the manifests including non-dowloaded one. If the platform has more than
one manifest, the Pull with unpack action will fail. And also, there is
no need to read non-best matched manifest. Therefore, the Manifest can
do the sort earlier.

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

theopenlab-ci Bot commented Jul 13, 2019

Build succeeded.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Jul 13, 2019

Codecov Report

Merging #3406 into master will decrease coverage by 3.93%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3406      +/-   ##
==========================================
- Coverage   48.98%   45.05%   -3.94%     
==========================================
  Files         102      113      +11     
  Lines        9903    12563    +2660     
==========================================
+ Hits         4851     5660     +809     
- Misses       4207     6049    +1842     
- Partials      845      854       +9
Flag Coverage Δ
#linux 48.98% <ø> (ø) ⬆️
#windows 40.27% <ø> (?)
Impacted Files Coverage Δ
snapshots/native/native.go 43.04% <0%> (-9.99%) ⬇️
cio/io.go 46.47% <0%> (-8.53%) ⬇️
metadata/snapshot.go 47.52% <0%> (-8.26%) ⬇️
archive/tar.go 43.79% <0%> (-7.07%) ⬇️
metadata/containers.go 47.97% <0%> (-6.62%) ⬇️
content/local/writer.go 58.65% <0%> (-5.55%) ⬇️
content/local/store.go 49.52% <0%> (-5.29%) ⬇️
metadata/images.go 57.57% <0%> (-4.99%) ⬇️
archive/tar_opts.go 28.57% <0%> (-4.77%) ⬇️
archive/compression/compression.go 58.69% <0%> (-4.7%) ⬇️
... and 63 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f2b6c31...d643f1d. Read the comment docs.

@crosbymichael crosbymichael requested a review from dmcgowan July 15, 2019 14:52
@dmcgowan
Copy link
Copy Markdown
Member

There was a case we were originally trying to cover here that maybe we should just skip, when the index doesn't have the platform but the platform could be matched from the config. However, I don't think that is a real case to support and filtering immediately on the index makes sense to me.

@fuweid
Copy link
Copy Markdown
Member Author

fuweid commented Jul 16, 2019

@dmcgowan I think the question is the client.Pull function only fetches one of manifest list. But the index has been downloaded and it has several manifests matched by the platform filter, for example, the ARM platform. I think we should find a way to ignore the non-existing matchable manifests. Otherwise, the Pull function will be replaced by Fetch and Unpack action.

Copy link
Copy Markdown
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

@crosbymichael
Copy link
Copy Markdown
Member

LGTM

@crosbymichael crosbymichael merged commit b5d0c78 into containerd:master Jul 16, 2019
@fuweid fuweid deleted the me-update-Manifest branch August 22, 2019 08:34
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.

4 participants