-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Heartbeat] Whitelist --index-management flag for heartbeat #13016
[Heartbeat] Whitelist --index-management flag for heartbeat #13016
Conversation
We received a bug report on [discuss](https://discuss.elastic.co/t/heartbeat-7-2-0-error-unknown-flag-index-management/191670) about this key being missing. It should have been added with elastic#11856 but was missed.
Pinging @elastic/uptime |
@@ -49,6 +49,7 @@ func init() { | |||
* ILM Policy | |||
` | |||
setup.ResetFlags() | |||
setup.Flags().Bool(cmd.IndexManagementKey, false, "Setup all components related to Elasticsearch index management, including template, ilm policy and rollover alias") | |||
setup.Flags().Bool(cmd.TemplateKey, false, "Setup index template") | |||
setup.Flags().Bool(cmd.ILMPolicyKey, false, "Setup ILM policy") |
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 suggest to also deprecate --template
and --ilm-policy
by setting something like:
setup.Flags().MarkDeprecated(cmd.TemplateKey, fmt.Sprintf("use --%s instead", cmd.IndexManagementKey))
setup.Flags().MarkDeprecated(cmd.ILMPolicyKey, fmt.Sprintf("use --%s instead", cmd.IndexManagementKey))
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.
Thanks @simitt , pushed up a fix
Filebeat test failure is unrelated. Should be ready for final review. |
…13016) * [Heartbeat] Whitelist --index-management flag for heartbeat We received a bug report on [discuss](https://discuss.elastic.co/t/heartbeat-7-2-0-error-unknown-flag-index-management/191670) about this key being missing. It should have been added with elastic#11856 but was missed. * Deprecate old keys (cherry picked from commit d43ec5e)
…13016) * [Heartbeat] Whitelist --index-management flag for heartbeat We received a bug report on [discuss](https://discuss.elastic.co/t/heartbeat-7-2-0-error-unknown-flag-index-management/191670) about this key being missing. It should have been added with elastic#11856 but was missed. * Deprecate old keys (cherry picked from commit d43ec5e)
…13042) * [Heartbeat] Whitelist --index-management flag for heartbeat We received a bug report on [discuss](https://discuss.elastic.co/t/heartbeat-7-2-0-error-unknown-flag-index-management/191670) about this key being missing. It should have been added with #11856 but was missed. * Deprecate old keys (cherry picked from commit d43ec5e)
…13043) * [Heartbeat] Whitelist --index-management flag for heartbeat We received a bug report on [discuss](https://discuss.elastic.co/t/heartbeat-7-2-0-error-unknown-flag-index-management/191670) about this key being missing. It should have been added with #11856 but was missed. * Deprecate old keys (cherry picked from commit d43ec5e)
…13016) (elastic#13043) * [Heartbeat] Whitelist --index-management flag for heartbeat We received a bug report on [discuss](https://discuss.elastic.co/t/heartbeat-7-2-0-error-unknown-flag-index-management/191670) about this key being missing. It should have been added with elastic#11856 but was missed. * Deprecate old keys (cherry picked from commit cc196f8)
We received a bug report on discuss about this key being missing. It should have been added with #11856 but was missed.
I haven't added tests here because this code is already very declarative. We mostly want to test the presence of this feature, not its implementation. While that has value here, the effort/benefit ratio here feels to me like something we can skip, which is what we did for @ruflin 's original PR.