-
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
Remove deprecated Init(), pass instance.Settings around. #10721
Conversation
Ensure settings from rootCmd are respected also when calling `export` and `setup`. fixes elastic#10720
1d93708
to
15fc3a1
Compare
15fc3a1
to
88dcec0
Compare
d2837f8
to
d5c053f
Compare
Failing tests are unrelated afaik. |
EDIT: I also found |
libbeat/cmd/instance/beat.go
Outdated
@@ -681,6 +681,7 @@ func (b *Beat) loadDashboards(ctx context.Context, force bool) error { | |||
} | |||
|
|||
if b.Config.Dashboards.Enabled() { | |||
|
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.
Please remove this line.
While the |
Thank you! |
jenkins, retest this please |
* Remove deprecated Init(), pass instance.Settings around. Ensure settings from rootCmd are respected also when calling `export` and `setup`. fixes elastic#10720
* Remove deprecated Init(), pass instance.Settings around. Ensure settings from rootCmd are respected also when calling `export` and `setup`. fixes elastic#10720
Currently following deprecated methods do not take
instance.Settings
as argumentGenRootCmd
,GenRootCmdWithRunFlags
andGenRootCmdWithIndexPrefixWithRunFlags
. Internally some commands also don't take theinstance.Settings
as params (genSetupCmd
,genKeystoreCmd
, ..). Since the introduction ofsettings.ILM
andsettings.IndexManagement
(https://github.com/elastic/beats/blob/master/libbeat/cmd/instance/settings.go#L41) this can lead to errors, as the defined Index and ILM Supporters might not be respected.This PR intends to
instance.Setting
as parameter so all configurations can be respected.fixes #10720