-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
support -f flag for --follow and -w for --wait in start-build #9963
Conversation
@@ -91,7 +91,7 @@ func NewCmdStartBuild(fullName string, f *clientcmd.Factory, in io.Reader, out i | |||
cmd.Flags().StringSliceVarP(&o.Env, "env", "e", o.Env, "Specify key value pairs of environment variables to set for the build container.") | |||
cmd.Flags().StringVar(&o.FromBuild, "from-build", o.FromBuild, "Specify the name of a build which should be re-run") | |||
|
|||
cmd.Flags().BoolVar(&o.Follow, "follow", o.Follow, "Start a build and watch its logs until it completes or fails") | |||
cmd.Flags().BoolVarP(&o.Follow, "follow", "f", o.Follow, "Start a build and watch its logs until it completes or fails") |
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.
-f
is generally for file... I'd expect that to map to --from-file
, if anything
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.
yeah but -f is follow for oc logs.
and --follow seems more commonly used than --from-file, so i felt it deserved precedence.
|
ok, so would you support this if i used -F instead of -f? |
yup. single letters are scarce and we want to make them as consistent as possible across as many commands as possible. ideally, we could support -F and -f concurrently for the log commands as well |
i've updated it to -F here. |
[test] |
Evaluated for origin test up to 555ce55 |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/6674/) |
@openshift/api-review bump |
Hold on using |
@deads2k so -F came about because of @liggitt's comment here: though on re-reading that link it's not clear to me if k8s is saying "-f for --follow should be deprecated in favor of -F", or "-f for files should be deprecated in favor of -F"... I assume the former, but it's not clearly stated) |
@openshift/api-review can we get a consensus here on how to move forward? |
He removed the I don't have any objection. |
I'm tempted to remove How many times do you think our users will want to follow builds, vs pass files vs. -f. |
Let's just use |
@smarterclayton does that constitute api approval? (begrudging approval?) |
Yes. |
begrudging [merge] |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/6960/) (Image: devenv-rhel7_4677) |
Evaluated for origin merge up to 555ce55 |
Don't we use |
@smarterclayton ptal, not sure if there was some good reason we never allowed this before?