Skip to content

remove runlabel test for global opts#12529

Merged
openshift-merge-robot merged 1 commit into
containers:mainfrom
vrothberg:fix-12436
Dec 8, 2021
Merged

remove runlabel test for global opts#12529
openshift-merge-robot merged 1 commit into
containers:mainfrom
vrothberg:fix-12436

Conversation

@vrothberg
Copy link
Copy Markdown
Member

@vrothberg vrothberg commented Dec 7, 2021

GLOBAL_OPTS haven't been supported for at least two major versions of
Podman. The runlabel code is extremely fragile and I think it should
be rewritten before adding new features.

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

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Dec 7, 2021

[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

Details 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 openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 7, 2021
Comment thread cmd/podman/containers/runlabel.go Outdated
@vrothberg
Copy link
Copy Markdown
Member Author

@containers/podman-maintainers PTAL

@umohnani8
Copy link
Copy Markdown
Member

LGTM, but tests look unhappy

@edsantiago
Copy link
Copy Markdown
Member

So, I don't know what's so special about OPT1/2/3, but removing that switch statement is causing failures:

# #/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# #|     FAIL: generating runlabel install command
# #| expected: '... run -t -i --rm uhMpcyEr5vQPeDRBmzMAY1ylhqRnhN --privileged -v /:/host --net=host --ipc=host --pid=host -e HOST=/host -e NAME=test1 -e IMAGE=localhost/runlabel_image:latest -e CONFDIR=/etc/test1 -e LOGDIR=/var/log/test1 -e DATADIR=/var/lib/test1 localhost/runlabel_image:latest Pzq3hfsYOCVyv2i0CJwFGSaZUf1mGw /bin/install.sh 3jV3wa2J6k13NlDMhgpqNvUQUcJID1'
# #|   actual: '... run -t -i --rm ${OPT1} --privileged -v /:/host --net=host --ipc=host --pid=host -e HOST=/host -e NAME=test1 -e IMAGE=localhost/runlabel_image:latest -e CONFDIR=/etc/test1 -e LOGDIR=/var/log/test1 -e DATADIR=/var/lib/test1 localhost/runlabel_image:latest ${OPT2} /bin/install.sh ${OPT3}'
# #\^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

@vrothberg
Copy link
Copy Markdown
Member Author

I am going to just remove the test since I am hitting the time limit I set trying to get global opts back. The runlabel code is extremely fragile and I think it should be rewritten before adding new features on top.

@vrothberg vrothberg changed the title runlabel: re-support GLOBAL_OPTS remove runlabel test for global opts Dec 8, 2021
@Luap99
Copy link
Copy Markdown
Member

Luap99 commented Dec 8, 2021

Can you also remove the useless globalOpts variable in the runlabel code?

GLOBAL_OPTS haven't been supported for at least two major versions of
Podman.  The runlabel code is extremely fragile and I think it should
be rewritten before adding new features.

Fixes: containers#12436
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Copy link
Copy Markdown
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM

@vrothberg
Copy link
Copy Markdown
Member Author

@containers/podman-maintainers PTAL

@mheon
Copy link
Copy Markdown
Member

mheon commented Dec 8, 2021

Do we need to remove the test entirely if the intent is to eventually re-add this?

@rhatdan
Copy link
Copy Markdown
Member

rhatdan commented Dec 8, 2021

Lets just remove then we can always get them back from git if necessary.
/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Dec 8, 2021
@openshift-merge-robot openshift-merge-robot merged commit d6079de into containers:main Dec 8, 2021
@vrothberg vrothberg deleted the fix-12436 branch December 8, 2021 14:53
@vrothberg
Copy link
Copy Markdown
Member Author

Do we need to remove the test entirely if the intent is to eventually re-add this?

I have no intend at the moment but think that the runlabel code should be rewritten at some point. @Luap99 is great with quoting and shell escapes, so it may be something for a cold winter afternoon :^)

@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 22, 2023
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 22, 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.

$GLOBAL_OPTS runlabel is not implemented

7 participants