-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Handle single character images #7158
Conversation
[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 |
fixes: #7114 |
Can you add a test? |
LGTM, code seems to work. Wish I'd replied sooner, I would've just suggested piggybacking on an existing |
LGTM |
pkg/api/handlers/libpod/images.go
Outdated
// I know mitr hates this ... but doing for now | ||
if len(query.Repo) > 1 { | ||
destImage = fmt.Sprintf("%s:%s", query.Repo, tag) | ||
if len(query.Repo) == 0 { |
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.
I'm always leery about " equals some number" could you convert to < 1
?
@rhatdan CI failures look real, in API tests:
I have to guess that your change somehow broke a corner case in APIv2. |
Yep, looks like 'podman commit containername`, with no imagename, is perfectly valid: $ ./bin/podman commit --help
podman commit [flags] CONTAINER [IMAGE]
$ ./bin/podman run --name a alpine true
$ ./bin/podman commit a
Getting image source signatures
Copying blob 50644c29ef5a skipped: already exists
Copying blob e624f929ee9f done
Copying config d8a029cf84 done
Writing manifest to image destination
Storing signatures
d8a029cf8407bc6406697214a1bbdfe8729a845e99323f5bfd590e6ea73c974b ...but with this PR, that usage is no longer being allowed. |
Currently you can only specify multiple character for image names when executing podman-remote commit podman-remote commit a b Will complete, but will save the image without a name. podman-remote commit a bb Works. This PR fixes and now returns an error if the user doees not specify an image name to commit to. Signed-off-by: Daniel J Walsh <[email protected]>
@cevich we're seeing a lot of these, on many different PRs and over a long period of time (all last week):
Does it look familiar? Is there anything you can think of that can make this more robust? |
/lgtm |
Yes, I've heard of this, and from multiple containers repositories (i.e. it's not just a problem in one google-project or github project or cirrus-ci configuration). Since yours represents "even more repeated complaints" now, I best bring it to the attention of CIrrus support. That's not a guarantee that can/will do anything about it, but maybe they can help find where the problem comes from (so we can avoid it somehow). |
@cevich here are three just from this PR, all demonstrating the same three-line failure: https://cirrus-ci.com/task/5071485364600832 Here's one with a zero-line failure: |
@edsantiago thanks, I'll get those right over to them. |
Currently you can only specify multiple character for image names
when executing podman-remote commit
podman-remote commit a b
Will complete, but will save the image without a name.
podman-remote commit a bb
Works.
This PR fixes and now returns an error if the user doees not specify an
image name to commit to.
Signed-off-by: Daniel J Walsh [email protected]