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

Fix incorrect oc run default option #19712

Conversation

michaelgugino
Copy link
Contributor

oc specific 'RunOptions' supplies incorrect default
generator for non-RestartAlways jobs.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1577770

@openshift-ci-robot openshift-ci-robot requested review from enj and soltysh May 14, 2018 21:48
@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 14, 2018
@juanvallejo
Copy link
Contributor

There is no need to change upstream behavior. Just remove the default generator that we are setting in wrappers.go

@michaelgugino
Copy link
Contributor Author

@juanvallejo NewCmdRunWithOptions does not exist upstream.

@michaelgugino michaelgugino force-pushed the fix-run-generator branch 2 times, most recently from e4352ef to 83d222d Compare May 14, 2018 22:34
@juanvallejo
Copy link
Contributor

@michaelgugino

NewCmdRunWithOptions does not exist upstream.

It still exists in our version of upstream.
Since it looks like we want the PodV1 generator when no generator and restart policy are specified by the user, we could probably default the value of the restart flag in the wrappers file to Never.

cmd.Flag("restart").DefValue = "Never"

cc @soltysh

@michaelgugino
Copy link
Contributor Author

@juanvallejo As suggested, I made the change only the wrapper and it works as intended.

Looks like restart policy defaults to always by getRestartPolicy; that would result in getting the correct generator (deployment config).

cmd.Flag("restart").DefValue = "Never" would change the default behavior compared to kubectl.

@michaelgugino
Copy link
Contributor Author

/test gcp

@soltysh
Copy link
Contributor

soltysh commented May 15, 2018

/approve
I'll let Juan lgtm this

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 15, 2018
@juanvallejo
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 15, 2018
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: juanvallejo, michaelgugino, soltysh

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-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 6c675da into openshift:master May 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants