-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Ensure etcd cli help flags cannot be missed #16034
Comments
if I didn't understand it wrong, what we do here is add a file |
Hey @charles-chenzz - Yes I think we can re-use a similar approach. Rather than the bash script test though I'm thinking we could make it part of one the formal go test suites. @serathius - If we go with implementing a test do you have any preference on if this is is a separate bash script approach, versus inclusion in one of the go test suites? |
if we re-use similar approach I think I can take it up |
The alternate approach of automated generation of help content sounds less error prone and will help the developers as well. If open for addition of that i can work on it. |
hey @jmhbnz I am trying to understand the issue. One thing, i am not getting is if a developer forgets to add the help content of a new flag in server/etcdmain/help.go than how can verfiying it with a approach as mentioned in kubernetes-sigs/metrics-server#939 can detect this since the help content here is not generating itself but it is using server/etcdmain/help.go file. Please correct me if I'm mistaken, but these are my preliminary understandings at the moment. |
Taking a closer look at this I think you're right - please feel free to propose an alternative idea based on automating the help content creation or more dynamically testing if it is up to date. |
Would an approach like #16465 work? |
Thanks for the great work on this @riendeau 🎉 |
#16465 have been backported on branch |
Thanks @ishan16696 for quickly and thoroughly solving the issue. |
What would you like to be added?
When we update etcd to introduce new command line parameters we currently don't have any tests or other automation to verify that our cli help stays in sync.
This situation played out recently where #14120 introduced new command line flags and reviewers did not catch the missing help content. This leads to followup pr's being required, example: #16031.
A potential approach we could try is introducing a test that will verify help content matches an expected template: kubernetes-sigs/metrics-server#939. Alternatively we could introduce some automation for the generation of the help content.
Why is this needed?
The text was updated successfully, but these errors were encountered: