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

local image lookup by digest #2934

Merged
merged 1 commit into from
Jan 26, 2021

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Jan 25, 2021

Detect local-image lookups by digest. Those clearly refer to local
images only, so we must not proceed to remote lookups.

Note that the specifed digest refers to an image ID and not to the
digest of an image's manifest.

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

What type of PR is this?

/kind api-change
/kind bug
/kind cleanup
/kind deprecation
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake
/kind other

What this PR does / why we need it:

How to verify it

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Detect local-image lookups by digest.  Those clearly refer to local
images only, so we must not proceed to remote lookups.

Note that the specifed digest refers to an image ID and not to the
digest of an image's manifest.

Fixes: containers#2836
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: rhatdan

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

@rhatdan
Copy link
Member Author

rhatdan commented Jan 25, 2021

Copy link
Member

@ashley-cui ashley-cui left a comment

Choose a reason for hiding this comment

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

LGTM

@umohnani8
Copy link
Member

/lgtm
/hold

@TomSweeneyRedHat
Copy link
Member

The tests are failing for me in my sandbox.

# $ /root/tsweeney/workspaces/containers/buildah/src/github.com/containers/buildah/tests/../bin/buildah inspect --format {{.FromImageID}} alpine
# 961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4
# $ /root/tsweeney/workspaces/containers/buildah/src/github.com/containers/buildah/tests/../bin/buildah from sha256:961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4
# Completed short name "sha256" with unqualified-search registries (origin: /root/tsweeney/workspaces/containers/buildah/src/github.com/containers/buildah/tests/registries.conf)
# 3 errors occurred while pulling:
#  * Error initializing source docker://sha256:961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4: Error reading manifest 961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4 in quay.io/libpod/sha256: unauthorized: access to the requested resource is not authorized
#  * Error initializing source docker://quay.io/sha256:961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4: Error reading manifest 961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4 in quay.io/sha256: StatusCode: 404, <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final/...
#  * Error initializing source docker://registry.fedoraproject.org/sha256:961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4: Error reading manifest 961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4 in registry.fedoraproject.org/sha256: manifest unknown: manifest unknown
# [ rc=125 (** EXPECTED 0 **) ]
# #/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# #| FAIL: exit code is 125; expected 0
# #\^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# ~/tsweeney/workspaces/containers/buildah/src/github.com/containers/buildah/tests

Maybe it's me?

@vrothberg
Copy link
Member

@TomSweeneyRedHat I think you used an old buildah binary for the test

@vrothberg
Copy link
Member

/hold cancel

@openshift-merge-robot openshift-merge-robot merged commit 4a532b6 into containers:release-1.19 Jan 26, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants