-
Notifications
You must be signed in to change notification settings - Fork 8.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
[config] stop merging arrays from multiple configs when using the dev cli #162842
Comments
Found a fairly simple way of solving this by a |
## Summary Change config merging behaviour, so that arrays are not merged/concatenated but replaced. Closes: elastic#162842 Related to: elastic#161884 Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 819d304)
## Summary Change config merging behaviour, so that arrays are not merged/concatenated but replaced. Closes: elastic#162842 Related to: elastic#161884 Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 819d304)
## Summary Change config merging behaviour, so that arrays are not merged/concatenated but replaced. Closes: elastic#162842 Related to: elastic#161884 Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@mistic can you help me decide if we want to backport this to older kibana versions? I think I was afraid to backport it because this is breaking the CLI's behavior, which is a public API of sorts. |
@delanni I think we can backport this at least to 8.10 as the original PR from Pierre is on that branch |
I think main was on 8.10 at the time when I merged this, so we're good. I just checked and the code is there in 8.10. |
Pierre merged #161884 in order to fix this when reading from raw config files.
However in dev cli this problem is still happening. We've tracked it down to this line https://github.com/elastic/kibana/blob/main/src/cli/serve/serve.js#L138 which is doing the merge via a simple lodash.merge call. The fix for that would be to use the same merge function / logic implemented in the mentioned PR above.
The problem could be replicated by using this config file https://github.com/elastic/kibana/blob/main/config/serverless.security.yml#L11 and then the following start dev command:
The text was updated successfully, but these errors were encountered: