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

container create: do not clear image name #8623

Merged
merged 1 commit into from
Dec 7, 2020

Conversation

vrothberg
Copy link
Member

When creating a container, do not clear the input-image name before
looking up image names. Also add a regression test.

Fixes: #8558
Signed-off-by: Valentin Rothberg rothberg@redhat.com

When creating a container, do not clear the input-image name before
looking up image names.  Also add a regression test.

Fixes: containers#8558
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
@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 Dec 7, 2020
@rhatdan
Copy link
Member

rhatdan commented Dec 7, 2020

This will need to be back ported to 2.2.1

LGTM

@Luap99
Copy link
Member

Luap99 commented Dec 7, 2020

/lgtm
/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 7, 2020
@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 7, 2020
@rhatdan
Copy link
Member

rhatdan commented Dec 7, 2020

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 7, 2020
@openshift-merge-robot openshift-merge-robot merged commit e117ad3 into containers:master Dec 7, 2020
@vrothberg vrothberg deleted the fix-8558 branch December 7, 2020 13:20
imageID="$output"

run_podman untag $IMAGE
run_podman run --rm $imageID ls
Copy link
Member

Choose a reason for hiding this comment

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

I find it helpful in regression tests to include the problem being fixed/tested. For example:

    # check exit status only; prior to #8623 this would error out with:
    # Error: both RootfsImageName and RootfsImageID must be set if either is set: invalid argument

First: should the error ever recur, this would help a maintainer understand how to fix it.

Second: it really isn't clear what this test is doing, which could lead to some future maintainer "helpfully" refactoring it or changing the invocation in some subtle way such that the test would no longer catch the original problem. A comment helps future maintainers understand that the code should not be touched.

Oh well, merged, too late now - but possibly for the backport, and for future such instances.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the feedback. I will take care to better document in the future.

Copy link
Member Author

Choose a reason for hiding this comment

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

edsantiago referenced this pull request in vrothberg/libpod Dec 7, 2020
As suggested by @edsantiago, add a comment to the regression test
of containers#8558 to better document the context.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
@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 24, 2023
@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.
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Both RootfsImageName and RootfsImageId must be set if either is set
6 participants