Skip to content

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

Merged
merged 1 commit into from
Apr 22, 2020

Conversation

stu-elastic
Copy link
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
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

try {
Files.write(
configFile,
Stream.concat(settings.entrySet().stream(), defaultConfig.entrySet().stream())
Stream.concat(settings.entrySet().stream(), baseConfig.entrySet().stream())
Copy link
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
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
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
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
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