Skip to content

Conversation

@masseyke
Copy link
Member

This commit changes NodeDeprecationChecks to look in both node settings and cluster settings when looking
for deprecated or removed settings. This allows it to find settings that were set dynamically.
Closes #82484

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@masseyke
Copy link
Member Author

@elasticmachine run elasticsearch-ci/packaging-tests-windows-sample

Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for working on this so quickly. I left two really minor comments.

In the future, maybe we should consider creating a NodeDeprecationContext that encapsulates all of these things (node settings, cluster settings, license, etc) so that if we need to pass additional information into the deprecation methods we don't have to manually change a bunch of method arities. Not that we should make any of those changes here, but maybe in future work on the deprecation framework.

final PluginsAndModules pluginsAndModules = new PluginsAndModules(Collections.emptyList(), Collections.emptyList());
final XPackLicenseState licenseState = new XPackLicenseState(Settings.EMPTY, () -> 0);
Metadata metadata = Metadata.builder().persistentSettings(clusterSettings).build();
;
Copy link
Member

Choose a reason for hiding this comment

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

?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd apparently typed two semicolons at the end of the previous line, and spotlessApply fixed that for me. :)

Settings nodettings = Settings.builder().build();
final PluginsAndModules pluginsAndModules = new PluginsAndModules(Collections.emptyList(), Collections.emptyList());
final XPackLicenseState licenseState = new XPackLicenseState(Settings.EMPTY, () -> 0);
Metadata metadata = Metadata.builder().persistentSettings(clusterSettings).build();
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps we should randomize here between using persistentSettings and transientSettings to make sure we catch both?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@masseyke
Copy link
Member Author

@elasticmachine run elasticsearch-ci/packaging-tests-windows-sample

1 similar comment
@masseyke
Copy link
Member Author

@elasticmachine run elasticsearch-ci/packaging-tests-windows-sample

@masseyke masseyke merged commit f60e517 into elastic:7.17 Jan 13, 2022
@masseyke masseyke deleted the fix/check-dynamic-settings-in-node-deprecation-checks branch January 13, 2022 19:37
@albertzaharovits albertzaharovits changed the title Checking both node and cluster settings in NodeDeprecationChecks Check both node and cluster settings in NodeDeprecationChecks Jan 25, 2022
masseyke added a commit that referenced this pull request Feb 23, 2022
This is a forward-port of #82487, #83544, #83601, #84145, and #84246, but given that the branches had diverged so much they were not a straightforward cherry-picks. It required modifying the interface of the NodeDeprecationChecks to include ClusterState as we do in 7.x.
probakowski pushed a commit to probakowski/elasticsearch that referenced this pull request Feb 23, 2022
This is a forward-port of elastic#82487, elastic#83544, elastic#83601, elastic#84145, and elastic#84246, but given that the branches had diverged so much they were not a straightforward cherry-picks. It required modifying the interface of the NodeDeprecationChecks to include ClusterState as we do in 7.x.
masseyke added a commit to masseyke/elasticsearch that referenced this pull request Feb 23, 2022
This is a forward-port of elastic#82487, elastic#83544, elastic#83601, elastic#84145, and elastic#84246, but given that the branches had diverged so much they were not a straightforward cherry-picks. It required modifying the interface of the NodeDeprecationChecks to include ClusterState as we do in 7.x.
masseyke added a commit to masseyke/elasticsearch that referenced this pull request Feb 23, 2022
This is a forward-port of elastic#82487, elastic#83544, elastic#83601, elastic#84145, and elastic#84246, but given that the branches had diverged so much they were not a straightforward cherry-picks. It required modifying the interface of the NodeDeprecationChecks to include ClusterState as we do in 7.x.
elasticsearchmachine pushed a commit that referenced this pull request Feb 23, 2022
This is a forward-port of #82487, #83544, #83601, #84145, and #84246, but given that the branches had diverged so much they were not a straightforward cherry-picks. It required modifying the interface of the NodeDeprecationChecks to include ClusterState as we do in 7.x.
elasticsearchmachine pushed a commit that referenced this pull request Feb 23, 2022
This is a forward-port of #82487, #83544, #83601, #84145, and #84246, but given that the branches had diverged so much they were not a straightforward cherry-picks. It required modifying the interface of the NodeDeprecationChecks to include ClusterState as we do in 7.x.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug Team:Data Management Meta label for data/management team v7.17.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants