Skip to content

Move the MDP error check into Environment#72498

Merged
rjernst merged 2 commits intoelastic:masterfrom
rjernst:mdp19
Apr 29, 2021
Merged

Move the MDP error check into Environment#72498
rjernst merged 2 commits intoelastic:masterfrom
rjernst:mdp19

Conversation

@rjernst
Copy link
Copy Markdown
Member

@rjernst rjernst commented Apr 29, 2021

The path.data setting could previously be configured as either a yaml
string, or a list. When a list, it appears internally to Settings as a
List object. However, now that path.data is a String setting, it gets
munged into a string representation of a list, beginning with [. That
works if checking the original version of the setting, but there are
several Settings and Environment objects creating during node
initialization, and the error check would not occur until after the path
was made absolute. This would make the string beginning with bracket
relative to the current directory, so the check for a list string would
just not work.

This commit moves the check into Environment, so that the first reading
of settings can error if a list is found.

relates #71205

The path.data setting could previously be configured as either a yaml
string, or a list. When a list, it appears internally to Settings as a
List object. However, now that path.data is a String setting, it gets
munged into a string representation of a list, beginning with `[`. That
works if checking the original version of the setting, but there are
several Settings and Environment objects creating during node
initialization, and the error check would not occur until after the path
was made absolute. This would make the string beginning with bracket
relative to the current directory, so the check for a list string would
just not work.

This commit moves the check into Environment, so that the first reading
of settings can error if a list is found.

relates elastic#71205
@rjernst rjernst added :Core/Infra/Core Core issues without another label >refactoring v8.0.0 labels Apr 29, 2021
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Apr 29, 2021
@elasticmachine
Copy link
Copy Markdown
Collaborator

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

@rjernst rjernst requested a review from jasontedor April 29, 2021 18:04
@rjernst
Copy link
Copy Markdown
Member Author

rjernst commented Apr 29, 2021

Note that the 7.x check for list will also need adjusting, but I will do that separately since the deprecation check no longer exists in master.

@rjernst rjernst merged commit 8602688 into elastic:master Apr 29, 2021
@rjernst rjernst deleted the mdp19 branch April 29, 2021 20:32
@rjernst rjernst mentioned this pull request Sep 30, 2021
17 tasks
rjernst added a commit to rjernst/elasticsearch that referenced this pull request Oct 11, 2021
This reverts commit 8602688.

The revert was conflict free.

relates elastic#78525
relates elastic#71205
rjernst added a commit that referenced this pull request Oct 12, 2021
This reverts commit 8602688.

The revert was conflict free.

relates #78525
relates #71205
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/Core Core issues without another label >refactoring Team:Core/Infra Meta label for core/infra team v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants