Skip to content
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 #161884

Merged
merged 3 commits into from
Jul 14, 2023

Conversation

pgayvallet
Copy link
Contributor

@pgayvallet pgayvallet commented Jul 13, 2023

Summary

Fix an unwanted behavior of the config merging logic, that was merging arrays the same way objects are merged.

E.g the output of getConfigFromFiles(file1, file2) with

### file 1
array: [1, 2, 3]
obj_array:
  - id: 1
  - id: 2

### file 2
array: [4]
obj_array:
  - id: 3

was

array: [4, 2, 3]
obj_array:
  - id: 3
  - id: 2

instead of

array: [4]
obj_array:
  - id: 3

Which is causing problems when merging the default, serverless, serverless project and dev file in some scenarios.

@pgayvallet pgayvallet added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc release_note:skip Skip the PR/issue when compiling release notes v8.10.0 labels Jul 13, 2023
@pgayvallet pgayvallet marked this pull request as ready for review July 14, 2023 06:38
@pgayvallet pgayvallet requested a review from a team as a code owner July 14, 2023 06:38
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

Copy link
Contributor

@gsoldevila gsoldevila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! How did you find out about this one?

@pgayvallet pgayvallet enabled auto-merge (squash) July 14, 2023 09:52
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 14 16 +2
securitySolution 411 415 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 15 17 +2
securitySolution 490 494 +4
total +6

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@pgayvallet pgayvallet merged commit a9f6e03 into elastic:main Jul 14, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jul 14, 2023
delanni added a commit that referenced this pull request Aug 15, 2023
## Summary
Change config merging behaviour, so that arrays are not
merged/concatenated but replaced.

Closes: #162842 

Related to: #161884

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 15, 2023
## 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)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 15, 2023
## 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)
hop-dev pushed a commit to hop-dev/kibana that referenced this pull request Aug 16, 2023
## 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>
bryce-b pushed a commit that referenced this pull request Aug 22, 2023
## Summary
Change config merging behaviour, so that arrays are not
merged/concatenated but replaced.

Closes: #162842 

Related to: #161884

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants