-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Align ES index-prefix parameter for jobs #4269
base: main
Are you sure you want to change the base?
Conversation
5eba836
to
4904f43
Compare
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 really don't think this PR is useful. It clearly shows that the naming of the flags is all over the place and inconsistent. Fixing one single flag doesn't make the situation any better, it only introduces churn and can break people in 3m who don't notice the deprecation. I don't see any benefits in breaking people for a cosmetic change.
} | ||
|
||
// InitFromViper initializes config from viper.Viper. | ||
func (c *Config) InitFromViper(v *viper.Viper) { | ||
c.IndexPrefix = v.GetString(indexPrefix) | ||
if c.IndexPrefix == "" { | ||
// try with deprecated flag | ||
c.IndexPrefix = v.GetString(deprecatedIndexPrefix) |
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.
this should log a warning about using deprecated flag
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.
solved
We can take the opportunity to review the cli flags in those commands, there are not so many. Let me know and I'll update the others as well. |
Signed-off-by: Guillaume Doussin <guillaume.doussin@amadeus.com>
I disagree. One of the worst sins for a project to do is break users. Your better have strong reasons if you do that, and here I don't see a good reason. It would be nice if we, the maintainers, were more diligent when this inconsistency was introduced the first time, but right now is has already been pushed downwards and adopted, few years ago. The complexity is also arguable. All these scripts are narrowly scoped to ES maintenance, I don't think it's especially difficult to grasp 10 or so flags, whether they are named consistently or not. |
Which problem is this PR solving?
Proposal to fix #4268
As it's a non-backward compatible change, let me know how you want to handle this.
I'm open to changes.
Short description of the changes