Skip to content
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

Merged
merged 1 commit into from
Jul 7, 2021

Conversation

vrothberg
Copy link
Member

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]

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]>
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 2, 2021

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Jul 2, 2021
@vrothberg
Copy link
Member Author

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.

@vrothberg vrothberg changed the title WIP - libimage: LookupImage: remove IgnorePlatform option libimage: LookupImage: remove IgnorePlatform option Jul 7, 2021
@vrothberg
Copy link
Member Author

Buildah and Podman are green. Ready to go.

@Luap99 @saschagrunert PTAL

@vrothberg
Copy link
Member Author

@rhatdan PTAL

@vrothberg
Copy link
Member Author

Once merged, I'll take of vendoring the changes into Buildah/Podman.

@rhatdan
Copy link
Member

rhatdan commented Jul 7, 2021

LGTM
@containers/podman-maintainers PTAL

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM

@Luap99
Copy link
Member

Luap99 commented Jul 7, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jul 7, 2021
@openshift-merge-robot openshift-merge-robot merged commit 0a4a190 into containers:main Jul 7, 2021
@vrothberg vrothberg deleted the arch-arch branch July 7, 2021 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants