Skip to content
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

initial cleanup of deprecation checks for 6.x #35326

Merged
merged 6 commits into from
Dec 3, 2018

Conversation

talevy
Copy link
Contributor

@talevy talevy commented Nov 7, 2018

The deprecation checks were primarily used for helping identity
breaking changes before upgrading latest minor releases to next
majors. This meant that these checks were not necessarily maintained
across future minors. This cleanup is a first step in preparing for
catching up on reporting all the existing deprecations in the 6.x
branch.

changes:

  • added cluster deprecation tests for existing updated checks
  • added node deprecation checks for azure and gcs plugins
  • removed stale index checks
  • added index check for indices created before 6.0

The deprecation checks were primarily used for helping identity
breaking changes before upgrading latest minor releases to next
majors. This meant that these checks were not necessarily maintained
across future minors. This cleanup is a first step in preparing for
catching up on reporting all the existing deprecations in the 6.x
branch.

changes:

- added cluster deprecation tests for existing updated checks
- added node deprecation checks for azure and gcs plugins
- removed stale index checks
- added index check for indices created before 6.0
@talevy talevy added the WIP label Nov 7, 2018
@tylersmalley
Copy link
Contributor

Should the cleanup target master and be backported so there is a clean slate?

@talevy
Copy link
Contributor Author

talevy commented Nov 7, 2018

@tylersmalley probably. I'll open a new PR that just deletes everything

@talevy talevy removed the WIP label Nov 14, 2018
@talevy
Copy link
Contributor Author

talevy commented Nov 14, 2018

the goal of this PR is to have at at least one Node, Cluster, and Index check each, so they can be more easily appended to. A PR against master to cleanup the existing leftover checks can be done in a different PR I think

@talevy talevy added the :Core/Infra/Core Core issues without another label label Nov 14, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@gwbrown gwbrown self-requested a review November 22, 2018 01:01
Copy link
Contributor

@gwbrown gwbrown left a comment

Choose a reason for hiding this comment

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

Looks good overall, left a few comments.

"breaking_60_indices_changes.html#_shadow_replicas_have_been_removed", null);
"Index created before 6.0",
"https://www.elastic.co/guide/en/elasticsearch/reference/master/" +
"breaking-changes-7.0.html#breaking_70_packaging_changes",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"breaking-changes-7.0.html#breaking_70_packaging_changes",
"breaking-changes-7.0.html",

I think this link should just link to https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html - the warning about indices created in old versions is at the top of the page and the text at this anchor doesn't really relate to this issue.

import java.util.stream.Collectors;

/**
* Index-specific deprecation checks
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Index-specific deprecation checks
* Node-specific deprecation checks

nodeInfo.getPlugins().getPluginInfos().stream()
.anyMatch(pluginInfo -> "repository-azure".equals(pluginInfo.getName()))
).map(nodeInfo -> nodeInfo.getNode().getName()).collect(Collectors.toList());
if (nodesFound.size() > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should these check to see if the deprecated settings are in use, rather than just that the plugin is present? I'm not very familiar with these plugins but it looks like you can use the new settings in 6.x so it would make sense to be more specific with the warnings.

That might be too much effort for too little gain, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought it would be too much effort for too little gain. maybe this can be discussed further in future discussions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

do you recommend I just remove these checks from here for now?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, this is fine, we can revise if necessary.

int maxShardsInCluster = shardsPerNode * nodeCount;
int currentOpenShards = maxShardsInCluster + randomIntBetween(0, 100);


Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Too much whitespace.


public class ClusterDeprecationChecksTests extends ESTestCase {

public void testCheckShardLimit() {
Copy link
Contributor

Choose a reason for hiding this comment

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

++, I should have had this in the PR to add the check in the first place. Thanks for adding it!

"[[type: testIncludeInAll, field: my_field]]");
"Index created before 6.0",
"https://www.elastic.co/guide/en/elasticsearch/reference/master/" +
"breaking-changes-7.0.html#breaking_70_packaging_changes",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"breaking-changes-7.0.html#breaking_70_packaging_changes",
"breaking-changes-7.0.html",

Same reasoning as above.

@gwbrown gwbrown added :Core/Features/Features and removed :Core/Infra/Core Core issues without another label labels Nov 27, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features

@talevy talevy requested a review from gwbrown November 27, 2018 22:45
@gwbrown
Copy link
Contributor

gwbrown commented Nov 30, 2018

Thanks Tal, LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants