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

manifest, push: use source as destination if not specified #18395

Merged

Conversation

flouthoc
Copy link
Collaborator

@flouthoc flouthoc commented May 1, 2023

manifest push <source> must work as-is if source is actually a valid path and no destination is provided, podman must internally choose source as its destination just like podman push

See: https://github.com/containers/podman/blob/main/cmd/podman/images/push.go#L161
Closes: #18360

Does this PR introduce a user-facing change?

manifest, push: use `source` as `destination` if not specified

@openshift-ci openshift-ci bot added release-note approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 1, 2023
flouthoc added a commit to flouthoc/buildah that referenced this pull request May 1, 2023
`manifest push <source>` must work as-is if source is actually a valid path and no destination is provided,
buildah must internally choose source as its destination just like `podman push`.

PR is similar to: containers/podman#18395

Signed-off-by: Aditya R <[email protected]>
@flouthoc flouthoc force-pushed the manifest-push-merge-dest branch from 1558a1d to 711ca62 Compare May 1, 2023 10:23
`manifest push <source>` must work as-is if `source` is actually a valid
path and no destination is provided, `podman` must internally choose
`source` as its `destination` just like `podman push`

See: https://github.com/containers/podman/blob/main/cmd/podman/images/push.go#L161
Closes: containers#18360

Signed-off-by: Aditya R <[email protected]>
@flouthoc flouthoc force-pushed the manifest-push-merge-dest branch from 711ca62 to bab4217 Compare May 1, 2023 11:34
@@ -114,7 +114,7 @@ func push(cmd *cobra.Command, args []string) error {
return err
}
listImageSpec := args[0]
destSpec := args[1]
destSpec := args[len(args)-1]
Copy link
Member

Choose a reason for hiding this comment

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

LGTM

@rhatdan
Copy link
Member

rhatdan commented May 1, 2023

@containers/podman-maintainers PTAL

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 2, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 2, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flouthoc, 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

Expect(session).To(ExitWithError())
// Push should actually fail since its not valid registry
Expect(session.ErrorToString()).To(ContainSubstring("requested access to the resource is denied"))
Expect(session.OutputToString()).To(Not(ContainSubstring("accepts 2 arg(s), received 1")))
Copy link
Member

Choose a reason for hiding this comment

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

this NOT check is pointless, you would need to match ErrorToString to string in order to actually check what you are trying to do. General speaking given that you already check for the error message above you could just drop this check.

@openshift-merge-robot openshift-merge-robot merged commit 1c9d033 into containers:main May 2, 2023
flouthoc added a commit to flouthoc/buildah that referenced this pull request May 4, 2023
`manifest push <source>` must work as-is if source is actually a valid path and no destination is provided,
buildah must internally choose source as its destination just like `podman push`.

PR is similar to: containers/podman#18395

Signed-off-by: Aditya R <[email protected]>
flouthoc added a commit to flouthoc/buildah that referenced this pull request May 4, 2023
`manifest push <source>` must work as-is if source is actually a valid path and no destination is provided,
buildah must internally choose source as its destination just like `podman push`.

PR is similar to: containers/podman#18395

Signed-off-by: Aditya R <[email protected]>
@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 Aug 26, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 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. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

manifest push fails when following example
5 participants