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

pull: account for platform #8228

Closed
wants to merge 1 commit into from
Closed

Conversation

vrothberg
Copy link
Member

When pulling an image, account for the specified OS and architecture
when looking up local images. While a local image may be found based
on the specified name, the platform may be different from what the
user desires. In that case, do not use the local image but continue
pulling.

Also remove pull-policy logic from the client. That'll reduce one
roundtrip for the remote client and reduces code scattering. The
backend should be the single source of truth for pull-policy handling.

Fixes: #8001
Signed-off-by: Valentin Rothberg [email protected]

@openshift-ci-robot
Copy link
Collaborator

[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-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 3, 2020
@vrothberg
Copy link
Member Author

@containers/podman-maintainers PTAL

@nalind, @TomSweeneyRedHat ... that's fixing the issue we chatted about yesterday

@nalind
Copy link
Member

nalind commented Nov 3, 2020

The new Image.matchesPlatform() seems a bit simple compared to the current version of similar logic in the image library (short version: ARM is complicated). Does it produce the correct results on arm64 systems?

@vrothberg
Copy link
Member Author

The new Image.matchesPlatform() seems a bit simple compared to the current version of similar logic in the image library (short version: ARM is complicated). Does it produce the correct results on arm64 systems?

Good catch. I forgot about "variant"! Is that what you were referring to?

@nalind
Copy link
Member

nalind commented Nov 3, 2020

The new Image.matchesPlatform() seems a bit simple compared to the current version of similar logic in the image library (short version: ARM is complicated). Does it produce the correct results on arm64 systems?

Good catch. I forgot about "variant"! Is that what you were referring to?

More vaguely than I should have, but yeah, variant.

@vrothberg
Copy link
Member Author

Curious. Jobs didn't get queued for three hours.

@rhatdan
Copy link
Member

rhatdan commented Nov 23, 2020

@vrothberg Could you rebase this and see if it passes tests?

libpod/image/image.go Outdated Show resolved Hide resolved
When pulling an image, account for the specified OS, architecture and
variant when looking up local images.  While a local image may be found
based on the specified name, the platform may be different from what the
user desires.  In that case, do not use the local image but continue
pulling.

Also remove pull-policy logic from the client.  That'll reduce one
roundtrip for the remote client and reduces code scattering.  The
backend should be the single source of truth for pull-policy handling.

Fixes: containers#8001
Signed-off-by: Valentin Rothberg <[email protected]>
@vrothberg
Copy link
Member Author

I am currently focusing on the copy work. I will go back to this PR after.

@github-actions
Copy link

A friendly reminder that this PR had no activity for 30 days.

@vrothberg
Copy link
Member Author

@rhatdan was faster to fix it :)

@vrothberg vrothberg closed this Jan 26, 2021
@vrothberg vrothberg deleted the fix-8001 branch January 26, 2021 12:09
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. stale-pr
Projects
None yet
4 participants