Skip to content

Test: don't modify defaultConfig on upgrade#55560

Merged
stu-elastic merged 1 commit intoelastic:masterfrom
stu-elastic:fix/clear-default-cfg-bwc
Apr 22, 2020
Merged

Test: don't modify defaultConfig on upgrade#55560
stu-elastic merged 1 commit intoelastic:masterfrom
stu-elastic:fix/clear-default-cfg-bwc

Conversation

@stu-elastic
Copy link
Copy Markdown
Contributor

Otherwise defaultConfig on bwc tests is the union of all
earlier configurations, which may have conflicting settings.

@stu-elastic stu-elastic added >bug :Delivery/Build Build or test infrastructure labels Apr 21, 2020
@stu-elastic stu-elastic requested a review from rjernst April 21, 2020 23:34
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Build)

@stu-elastic stu-elastic requested review from mark-vieira and removed request for rjernst April 21, 2020 23:37
Files.write(
configFile,
Stream.concat(settings.entrySet().stream(), defaultConfig.entrySet().stream())
Stream.concat(settings.entrySet().stream(), baseConfig.entrySet().stream())
Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Contributor Author

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);

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor

@mark-vieira mark-vieira left a comment

Choose a reason for hiding this comment

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

👍

@stu-elastic stu-elastic merged commit 58ec9c3 into elastic:master Apr 22, 2020
stu-elastic added a commit to stu-elastic/elasticsearch that referenced this pull request Apr 22, 2020
@stu-elastic
Copy link
Copy Markdown
Contributor Author

master: 58ec9c3
7.x (7.8): 41748f0

@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team v7.8.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants