images: only fetch the best matched manifest info#3406
images: only fetch the best matched manifest info#3406crosbymichael merged 1 commit intocontainerd:masterfrom
Conversation
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]>
|
Build succeeded.
|
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
|
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. |
|
@dmcgowan I think the question is the |
|
LGTM |
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]