Skip to content

Add REST APIs for IndexTemplateV2Metadata CRUD#54039

Merged
dakrone merged 9 commits intoelastic:masterfrom
dakrone:itv2-add-itv2-rest-apis
Mar 27, 2020
Merged

Add REST APIs for IndexTemplateV2Metadata CRUD#54039
dakrone merged 9 commits intoelastic:masterfrom
dakrone:itv2-add-itv2-rest-apis

Conversation

@dakrone
Copy link
Copy Markdown
Member

@dakrone dakrone commented Mar 23, 2020

This commit adds the get/put/delete APIs for interacting with the now v2 versions of index
templates.

These APIs are behind the existing es.itv2_feature_flag_registered system property feature flag.

Relates to #53101

This commit adds the get/put/delete APIs for interacting with the now v2 versions of index
templates.

These APIs are behind the existing `es.itv2_feature_flag_registered` system property feature flag.

Relates to elastic#53101
@dakrone dakrone added >non-issue :Data Management/Indices APIs DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. v8.0.0 v7.7.0 labels Mar 23, 2020
@elasticmachine
Copy link
Copy Markdown
Collaborator

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

@martijnvg martijnvg mentioned this pull request Mar 23, 2020
39 tasks
@martijnvg
Copy link
Copy Markdown
Member

Is it possible to reuse the existing index template rest and transport actions?
If the request body has a top level template or composed_of field then it is a v2 template and if settings, mappings or aliases is a top level field then it is a v1 template. If the template is empty then we assume it is a v2 template.

@dakrone
Copy link
Copy Markdown
Member Author

dakrone commented Mar 24, 2020

@elasticmachine update branch

@bpintea bpintea added v7.8.0 and removed v7.7.0 labels Mar 25, 2020
@dakrone
Copy link
Copy Markdown
Member Author

dakrone commented Mar 25, 2020

@martijnvg and I talked and decided to stick with new endpoints. This allows ITv2 to have a separate response format for the GET (the newer list of maps format) and makes it easier to deprecate and eventually remove the old v1 endpoint.

Copy link
Copy Markdown
Member

@martijnvg martijnvg 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! I left a few small comments.

@dakrone
Copy link
Copy Markdown
Member Author

dakrone commented Mar 25, 2020

@elasticmachine update branch

@dakrone dakrone requested a review from martijnvg March 26, 2020 21:08
Copy link
Copy Markdown
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

LGTM

@dakrone dakrone merged commit e89e916 into elastic:master Mar 27, 2020
@dakrone dakrone deleted the itv2-add-itv2-rest-apis branch March 27, 2020 13:56
dakrone added a commit to dakrone/elasticsearch that referenced this pull request Mar 27, 2020
* Add REST APIs for IndexTemplateV2Metadata CRUD

This commit adds the get/put/delete APIs for interacting with the now v2 versions of index
templates.

These APIs are behind the existing `es.itv2_feature_flag_registered` system property feature flag.

Relates to elastic#53101

* Add exceptions for HLRC tests

* Add skips for 7.x versions

* Use index_template instead of template_v2 in action names

* Add test for MetaDataIndexTemplateService.addIndexTemplateV2

* Move removal to static method and add test

* Add unit tests for request classes (implement hashCode & equals)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
dakrone added a commit that referenced this pull request Mar 27, 2020
* Add REST APIs for IndexTemplateV2Metadata CRUD (#54039)

* Add REST APIs for IndexTemplateV2Metadata CRUD

This commit adds the get/put/delete APIs for interacting with the now v2 versions of index
templates.

These APIs are behind the existing `es.itv2_feature_flag_registered` system property feature flag.

Relates to #53101

* Add exceptions for HLRC tests

* Add skips for 7.x versions

* Use index_template instead of template_v2 in action names

* Add test for MetaDataIndexTemplateService.addIndexTemplateV2

* Move removal to static method and add test

* Add unit tests for request classes (implement hashCode & equals)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

* Fix compilation

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
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. >non-issue v7.8.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants