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

Made small modifications to ESRestTestCase. #70531

Merged
merged 2 commits into from
Mar 18, 2021

Conversation

martijnvg
Copy link
Member

  • Don't try to invoke delete component/index templates APIs if there are no templates to delete.
  • Don't delete deprecation templates by marking these as xpack templates.

Relates to #69973

* Don't try to invoke delete component/index templates APIs if there are no templates to delete.
* Don't delete deprecation templates by marking these as xpack templates.

Relates to elastic#69973
@martijnvg martijnvg added >test Issues or PRs that are addressing/adding tests :Data Management/Indices APIs APIs to create and manage indices and templates v8.0.0 v7.13.0 v7.12.1 v7.11.3 labels Mar 17, 2021
@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Mar 17, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (Team:Core/Features)

@@ -1391,6 +1395,9 @@ protected static boolean isXPackTemplate(String name) {
if (name.startsWith(".transform-")) {
return true;
}
if (name.startsWith(".deprecation-")) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is for: .deprecation-indexing-mappings, .deprecation-indexing-settings and .deprecation-indexing-template templates.

@@ -1391,6 +1395,9 @@ protected static boolean isXPackTemplate(String name) {
if (name.startsWith(".transform-")) {
return true;
}
if (name.startsWith(".deprecation-")) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Referencing #66413 here, because all this logic in this class about protecting xpack related templates wouldn't be needed if these component and composable index templates are system owned.

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

If we're concerned about the speed of deleting the templates for older (pre 7.13) clusters, what about performing the deletes in parallel instead of waiting to delete them one-by-one serially? (maybe in a future PR)

@martijnvg
Copy link
Member Author

If we're concerned about the speed of deleting the templates for older (pre 7.13) clusters, what about performing the deletes in parallel instead of waiting to delete them one-by-one serially? (maybe in a future PR)

Good idea, perhaps this could work. I will try this out. I do wonder how much this going to help for the slow build machines.

@martijnvg martijnvg merged commit ef9b1bf into elastic:master Mar 18, 2021
martijnvg added a commit to martijnvg/elasticsearch that referenced this pull request Mar 18, 2021
Backporting elastic#70531 to the 7.x branch.

* Don't try to invoke delete component/index templates APIs if there are no templates to delete.
* Don't delete deprecation templates by marking these as xpack templates.

Relates to elastic#69973
martijnvg added a commit that referenced this pull request Mar 18, 2021
Backporting #70531 to the 7.x branch.

* Don't try to invoke delete component/index templates APIs if there are no templates to delete.
* Don't delete deprecation templates by marking these as xpack templates.

Relates to #69973
martijnvg added a commit to martijnvg/elasticsearch that referenced this pull request Mar 18, 2021
Backporting elastic#70531 to the 7.12 branch.

* Don't try to invoke delete component/index templates APIs if there are no templates to delete.
* Don't delete deprecation templates by marking these as xpack templates.

Relates to elastic#69973
martijnvg added a commit to martijnvg/elasticsearch that referenced this pull request Mar 18, 2021
Backporting elastic#70531 to the 7.11 branch.

* Don't try to invoke delete component/index templates APIs if there are no templates to delete.
* Don't delete deprecation templates by marking these as xpack templates.

Relates to elastic#69973
martijnvg added a commit that referenced this pull request Mar 18, 2021
Backporting #70531 to the 7.12 branch.

* Don't try to invoke delete component/index templates APIs if there are no templates to delete.
* Don't delete deprecation templates by marking these as xpack templates.

Relates to #69973
martijnvg added a commit that referenced this pull request Mar 18, 2021
Backporting #70531 to the 7.11 branch.

* Don't delete deprecation templates by marking these as xpack templates.

Relates to #69973
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Indices APIs APIs to create and manage indices and templates Team:Data Management Meta label for data/management team >test Issues or PRs that are addressing/adding tests v7.11.3 v7.12.1 v7.13.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants