ctr pull should unpack for default platform when transfer service is used#11086
Conversation
Signed-off-by: Jin Dong <[email protected]>
|
hi @dmcgowan could you PTAL this PR when you get some time? thanks. This makes |
| sopts = append(sopts, image.WithUnpack(platform, cliContext.String("snapshotter"))) | ||
| allPlatforms := cliContext.Bool("all-platforms") | ||
| if len(p) > 0 && allPlatforms { | ||
| return errors.New("cannot specify both --platform and --all-platforms") |
There was a problem hiding this comment.
This is probably out-of-scope for this PR, but are there other subcommands using all-platforms that would benefit from this check?
There was a problem hiding this comment.
Other commands just ignore --platforms if both are specified, e.g., in Fetch:
containerd/cmd/ctr/commands/content/fetch.go
Lines 137 to 143 in e514bae
I think error early is better than ignore one flag, but am okay to keep it the same with other commands
|
/cherrypick release/2.0 |
|
@djdongjin: new pull request created: #11139 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
nice, will remove that fix from my PR |
Currently if neither
--all-platformsnor--platformis specified inctr i pull, it will pull using the default platform, but skip the unpack step (if using transfer service). However, we should apply thedefault platformto unpack as well.