-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Test: don't modify defaultConfig on upgrade #55560
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
Test: don't modify defaultConfig on upgrade #55560
Conversation
Pinging @elastic/es-core-infra (:Core/Infra/Build) |
|
||
try { | ||
Files.write( | ||
configFile, | ||
Stream.concat(settings.entrySet().stream(), defaultConfig.entrySet().stream()) | ||
Stream.concat(settings.entrySet().stream(), baseConfig.entrySet().stream()) |
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'm a bit confused. Is the configuration in defaultConfig
not needed? ElasticsearchCluster.commonNodeConfig()
places a bunch of stuff in there. Won't this change now no longer write those config items to the config file or am I missing something?
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.
On line 1052 we initialize baseConfig
with defaultConfig
:
Map<String, String> baseConfig = new HashMap<>(defaultConfig);
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.
That's indeed what I was missing.
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.
👍
Otherwise
defaultConfig
on bwc tests is the union of allearlier configurations, which may have conflicting settings.