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

Show all global flags in options command #7292

Merged
merged 1 commit into from
Mar 28, 2020
Merged

Show all global flags in options command #7292

merged 1 commit into from
Mar 28, 2020

Conversation

linkvt
Copy link
Contributor

@linkvt linkvt commented Mar 27, 2020

Fixes #5117
Before this fix the flags shown in minikube options were taken from a list of options (viperWhiteList) which seems a bit arbitrary to me with no background.
I still don't know for sure why this is done but taking all PersistentFlags (persistent=apply to all sub commands) from the root command seems like the correct way.

This doesn't fix the problem as described in the issue but keeps it consistent with e.g. kubectl, which also shows global flags only with the options command.

Before

 $ minikube version && minikube options
minikube version: v1.9.0
commit: 48fefd43444d2f8852f527c78f0141b377b1e42a
The following options can be passed to any command:

      --alsologtostderr=false: log to standard error as well as files
      --log_dir='': If non-empty, write log files in this directory
  -v, --v=0: log level for V logs

After

 $ make && out/minikube version && out/minikube options
make: `out/minikube' is up to date.
minikube version: v1.9.0
commit: b47e8d502fb62ec0a968c47e75414aeadf125b4d
The following options can be passed to any command:

      --alsologtostderr=false: log to standard error as well as files
  -b, --bootstrapper='kubeadm': The name of the cluster bootstrapper that will set up the kubernetes cluster.
      --log_backtrace_at=:0: when logging hits line file:N, emit a stack trace
      --log_dir='': If non-empty, write log files in this directory
      --logtostderr=false: log to standard error instead of files
  -p, --profile='minikube': The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently.
      --stderrthreshold=2: logs at or above this threshold go to stderr
  -v, --v=0: log level for V logs
      --vmodule=: comma-separated list of pattern=N settings for file-filtered logging

@k8s-ci-robot k8s-ci-robot added do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 27, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @linkvt. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 27, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: linkvt
To complete the pull request process, please assign sharifelgamal
You can assign the PR to them by writing /assign @sharifelgamal in a comment when ready.

The full list of commands accepted by this bot can be found 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

Before this fix the flags shown in `minikube options` were taken from a
list of options (`viperWhiteList`) which seems arbitrary.
I still don't know for sure why this is done but taking all
PersistentFlags (persistent=apply to all sub commands) from the root
command seems like the correct way.
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Mar 27, 2020
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@medyagh
Copy link
Member

medyagh commented Mar 28, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 28, 2020
@minikube-pr-bot
Copy link

Error: running mkcmp: exit status 1

@medyagh medyagh merged commit 801d49a into kubernetes:master Mar 28, 2020
@medyagh
Copy link
Member

medyagh commented Mar 28, 2020

@linkvt thank you for fixing this !

@linkvt linkvt deleted the fix-missing-global-options branch March 28, 2020 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

--help doesn't output global flags anymore
5 participants