Skip to content

Emit deprecation warning if multiple v1 templates match with a new index#55558

Merged
probakowski merged 14 commits intoelastic:masterfrom
probakowski:deprecate-multiple-v1-templates
Apr 30, 2020
Merged

Emit deprecation warning if multiple v1 templates match with a new index#55558
probakowski merged 14 commits intoelastic:masterfrom
probakowski:deprecate-multiple-v1-templates

Conversation

@probakowski
Copy link
Copy Markdown
Contributor

This change adds deprecation warning when multiple v1 templates match with a new index.
This is deprecated because with v2 templates only one template can match and multiple "levels" of settings should be done using component templates.

Relates to #53101

@probakowski probakowski added :Data Management/Indices APIs DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. v8.0.0 v7.8.0 labels Apr 21, 2020
@elasticmachine
Copy link
Copy Markdown
Collaborator

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

@martijnvg martijnvg mentioned this pull request Apr 21, 2020
39 tasks
Copy link
Copy Markdown
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.

Thanks for changing this @probakowski! Before we merge it could you run a test locally with ESClientYamlTestSuite's method:

@BeforeClass
public static void initializeUseDefaultNumberOfShards() {
    useDefaultNumberOfShards = usually();
}

Where usually() is changed to false? This will install a global template for all the YAML tests, and I want to make sure there are no tests that are going to fail due to warnings (better to fail now before we cause CI failures)

probakowski and others added 2 commits April 22, 2020 19:51
…taCreateIndexService.java

Co-Authored-By: Lee Hinman <dakrone@users.noreply.github.com>
@probakowski
Copy link
Copy Markdown
Contributor Author

@dakrone that was good idea, there's plenty of failures. I'll work on fixing them and request review again when done

@probakowski
Copy link
Copy Markdown
Contributor Author

@elasticmachine update branch

@probakowski
Copy link
Copy Markdown
Contributor Author

@elasticmachine update branch

@probakowski probakowski requested a review from dakrone April 29, 2020 07:38
@probakowski
Copy link
Copy Markdown
Contributor Author

@elasticmachine run elasticsearch-ci/2

Copy link
Copy Markdown
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.

This LGTM, thanks Przemko! I left a comment about clarifying the warning text though, let me know what you think

@probakowski
Copy link
Copy Markdown
Contributor Author

@elasticmachine update branch

@probakowski probakowski merged commit ad77c7e into elastic:master Apr 30, 2020
@probakowski probakowski deleted the deprecate-multiple-v1-templates branch April 30, 2020 14:38
probakowski added a commit to probakowski/elasticsearch that referenced this pull request Apr 30, 2020
…dex (elastic#55558)

* Emit deprecation warning if multiple v1 templates match with a new index
probakowski added a commit that referenced this pull request Apr 30, 2020
…new index (#55558) (#56038)

* Emit deprecation warning if multiple v1 templates match with a new index (#55558)

* Emit deprecation warning if multiple v1 templates match with a new index

* DEPRECATION_LOGGER rename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/Indices APIs DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. >enhancement v7.8.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants