-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Deprecate configtest and add validate command #2732
Conversation
LGTM with one addition - missed the success message and |
LGTM |
var quiet bool | ||
|
||
f := c.Command.NewFlagSet(c) | ||
f.Var((*agent.AppendSliceValue)(&configFiles), "config-file", |
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.
@kyhavlov I still think it'd be a better UX to just accept one option here and determine if it's a file or folder appropriately. I don't see a reason why we need to treat them separately.
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.
I left those in as hidden flags to stay compatible with configtest; everything (args, -config-file
, config-dir
) gets added to configFiles
which works with files or directories. Do you think we should just remove the flags from validate altogether?
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.
Ah sorry. I didn't see the "hidden" call below. +1 to BC! Great work on this and sorry for the confusion
consul validate seem to fail is there's no 'data_dir' in the config file even though you could just use a cli option to provide that parameter.
|
Hides the configtest command, adds a deprecation notice, and adds the validate command with the old configtest flags as hidden flags.
Closes #2421