-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[DO NOT MERGE] Add push with only digest support #20486
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: umohnani8 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 |
Cockpit tests failed for commit ce0de483e91a5cbe46533add31bd96c44de27ecd. @martinpitt, @jelly, @mvollmer please check. |
79cf834
to
6f5058a
Compare
Cockpit tests failed for commit 6f5058ab1a534447aaa27cfe9967a00f24fc5bf0. @martinpitt, @jelly, @mvollmer please check. |
Cockpit tests failed for commit 79cf834f2507de3e8e423ab624207f9e4049b1e2. @martinpitt, @jelly, @mvollmer please check. |
Cockpit tests failed for commit 6f5058ab1a534447aaa27cfe9967a00f24fc5bf0. @martinpitt, @jelly, @mvollmer please check. |
Cockpit tests failed for commit 79cf834f2507de3e8e423ab624207f9e4049b1e2. @martinpitt, @jelly, @mvollmer please check. |
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.
This
- changes the semantics of previously-valid tag destinations. I think this needs to be a new syntax.
- with editing
docker/reference
, also conceptually suggests that references used in other contexts (docker-daemon:
,containers-storage
, Podman remote API) can be “digest only”; this feature only targets c/image/docker, so it seems to me that it should are confined there.
vendor/github.com/containers/image/v5/docker/docker_transport.go
Outdated
Show resolved
Hide resolved
vendor/github.com/containers/image/v5/docker/docker_transport.go
Outdated
Show resolved
Hide resolved
@mtrmac I pushed some updates based on our discussions, PTAL |
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.
For earlier context, #20486 (comment) .
vendor/github.com/containers/image/v5/docker/docker_image_src.go
Outdated
Show resolved
Hide resolved
vendor/github.com/containers/image/v5/docker/docker_transport.go
Outdated
Show resolved
Hide resolved
vendor/github.com/containers/image/v5/docker/docker_transport.go
Outdated
Show resolved
Hide resolved
vendor/github.com/containers/image/v5/docker/docker_transport.go
Outdated
Show resolved
Hide resolved
vendor/github.com/containers/image/v5/docker/reference/normalize.go
Outdated
Show resolved
Hide resolved
[NO NEW TESTS NEEDED] Signed-off-by: Urvashi Mohnani <[email protected]>
func newReference(ref reference.Named) (dockerReference, error) { | ||
if reference.IsNameOnly(ref) { | ||
func newReference(ref reference.Named, unknownDigest bool) (dockerReference, error) { | ||
if (reference.IsNameOnly(ref) && !unknownDigest) || (!reference.IsNameOnly(ref) && unknownDigest) { | ||
return dockerReference{}, fmt.Errorf("Docker reference %s has neither a tag nor a digest", reference.FamiliarString(ref)) |
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.
The error message is now misleading for the new case.
PR merged in c/image - will open a PR with vendor and farm build changes |
[NO NEW TESTS NEEDED]
Does this PR introduce a user-facing change?