-
Notifications
You must be signed in to change notification settings - Fork 203
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
libimage: LookupImage: remove IgnorePlatform option #664
Conversation
When writing LookupImage, I thought that it's a good idea to always attempt to match an image against the local (or requested) platform. The use case I had in mind is multi-arch support: `$ podman run image` should only match `image` if it matches the local platform. We may have previously pulled `image` for another architecture. The core criteria for these checks is that images set their platform (arch/os/variant) correctly. As it turned out that is not the case. We recently performed a number of fixes to better support multi-arch images and this change should put the last nail in the coffin. Hence, entirely remove the `IgnorePlatform` option and only perform platform matches if the arch, os or variant is specified explicitly via the LookupImageOptions or the runtime's system context (as Buildah likes to do it). Note that this is a breaking change, so I need to update Buildah and Podman. Signed-off-by: Valentin Rothberg <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vrothberg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
First need to spin up PRs against Buildah and Podman. Once I got them green, I will start following the dependency chain and do the vendor dance. |
Buildah and Podman are green. Ready to go. @Luap99 @saschagrunert PTAL |
@rhatdan PTAL |
Once merged, I'll take of vendoring the changes into Buildah/Podman. |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/lgtm |
When writing LookupImage, I thought that it's a good idea to always
attempt to match an image against the local (or requested) platform.
The use case I had in mind is multi-arch support:
$ podman run image
should only matchimage
if it matches the localplatform. We may have previously pulled
image
for anotherarchitecture.
The core criteria for these checks is that images set their platform
(arch/os/variant) correctly. As it turned out that is not the case.
We recently performed a number of fixes to better support multi-arch
images and this change should put the last nail in the coffin.
Hence, entirely remove the
IgnorePlatform
option and only performplatform matches if the arch, os or variant is specified explicitly via
the LookupImageOptions or the runtime's system context (as Buildah likes
to do it).
Note that this is a breaking change, so I need to update Buildah and
Podman.
Signed-off-by: Valentin Rothberg [email protected]