-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[EPM] Use index templates v2 #64305
[EPM] Use index templates v2 #64305
Conversation
Pinging @elastic/ingest-management (Team:Ingest Management) |
2a54e76
to
fab7137
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this with elastic/package-registry#392 and works as expected.
@skh At the moment all the mappings for metrics-system.cpu
are directly in this template. As a next step I would suggest to also use components here so we have metrics-system.cpu-mapping
component, this will make it natural if we add later metrics-system.cpu-settings
.
For alpha 1? |
@elasticmachine merge upstream |
@skh Alpha 1 question: No. |
I did forget to handle index template deletion, 351a051 fixes that. To test this:
|
@ruflin thanks for the approval! |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
Also tested the deleting part for nginx and templates are removed again on uninstall. |
* Install prebuilt index templates as v2 * Correctly handle pre-build v1 index templates * Generate index templates v2 during package install * Update unit tests for index template v2 * Fix imports. * Fix types. * Use index template v2 API for template deletion Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Install prebuilt index templates as v2 * Correctly handle pre-build v1 index templates * Generate index templates v2 during package install * Update unit tests for index template v2 * Fix imports. * Fix types. * Use index template v2 API for template deletion Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
Implements the alpha1 / 7.8 parts of #63950
base
packageThis should not affect how we update packages, as long as we don't use index template composition for generated v2 index templates.
How to test this
yarn es snapshot
).curl
that after login,GET _cat/templates
correctly lists all packages from thebase
package that was installed during setup (that is,event-mappings
,event-settings
,logs-mappings
,logs-settings
,metrics-mappings
andmetrics-settings
.xpack.ingestManager.epm.registryUrl
set tohttp://localhost:8080
, against another fresh elasticsearch database.curl
that after login,GET _index_template
andGET _component_template
correctly return all v2 index templates and component templates that were added / changed in Use index templates v2 in package 'base' package-registry#392.GET _index_template
correctly returns a v2 index template for every dataset from thesystem
package.nginx
package, thereby triggering the installation of this package. This should work without error too. Again, verify withGET _index_template
that index templates have been installed for all datasets of the package.nginx-1
datasource, then uninstall thenginx
integration. Both operation should complete without errors.GET _index_template
that thenginx
index templates have been removed.