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

Add REST APIs for IndexTemplateV2Metadata CRUD #54039

Merged
merged 9 commits into from
Mar 27, 2020

Conversation

dakrone
Copy link
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 APIs to create and manage indices and templates v8.0.0 v7.7.0 labels Mar 23, 2020
@elasticmachine
Copy link
Collaborator

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

@martijnvg martijnvg mentioned this pull request Mar 23, 2020
39 tasks
@martijnvg
Copy link
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
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
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
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
Member Author

dakrone commented Mar 25, 2020

@elasticmachine update branch

@dakrone dakrone requested a review from martijnvg March 26, 2020 21:08
Copy link
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 <[email protected]>
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 <[email protected]>

* Fix compilation

Co-authored-by: Elastic Machine <[email protected]>
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 >non-issue v7.8.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants