-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Allow removing unreferenced composable data stream templates #84376
Allow removing unreferenced composable data stream templates #84376
Conversation
Previously there was a bug where when we retrieved the list of data streams using a template, we only checked index patterns, rather than actually comparing priorities and only treating the highest priority template as "referenced". This commit fixes this problem by only treating the matching composable template as referenced, allowing unreferenced templates to be safely deleted. Resolves elastic#84188 Resolves elastic#84171
Pinging @elastic/es-data-management (Team:Data Management) |
Hi @dakrone, I've created a changelog YAML for you. |
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.
LGTM, thanks for fixing this Lee
client().execute(PutComposableIndexTemplateAction.INSTANCE, request).actionGet(); | ||
|
||
DeleteComposableIndexTemplateAction.Request deleteRequest = new DeleteComposableIndexTemplateAction.Request("id"); | ||
client().execute(DeleteComposableIndexTemplateAction.INSTANCE, deleteRequest).get(); |
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.
Would it be worth adding an assertion the template is actually deleted/missing from the system? (to fend against bugs that'd swallow the exception or such)
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.
Good idea, I've added this.
0738c28
to
e9e9d0b
Compare
@elasticmachine update branch |
@elasticmachine update branch |
…#84376) Previously there was a bug where when we retrieved the list of data streams using a template, we only checked index patterns, rather than actually comparing priorities and only treating the highest priority template as "referenced". This commit fixes this problem by only treating the matching composable template as referenced, allowing unreferenced templates to be safely deleted. Resolves elastic#84188 Resolves elastic#84171
…#84376) Previously there was a bug where when we retrieved the list of data streams using a template, we only checked index patterns, rather than actually comparing priorities and only treating the highest priority template as "referenced". This commit fixes this problem by only treating the matching composable template as referenced, allowing unreferenced templates to be safely deleted. Resolves elastic#84188 Resolves elastic#84171
…#84376) Previously there was a bug where when we retrieved the list of data streams using a template, we only checked index patterns, rather than actually comparing priorities and only treating the highest priority template as "referenced". This commit fixes this problem by only treating the matching composable template as referenced, allowing unreferenced templates to be safely deleted. Resolves elastic#84188 Resolves elastic#84171
…#84449) Previously there was a bug where when we retrieved the list of data streams using a template, we only checked index patterns, rather than actually comparing priorities and only treating the highest priority template as "referenced". This commit fixes this problem by only treating the matching composable template as referenced, allowing unreferenced templates to be safely deleted. Resolves #84188 Resolves #84171
…#84450) Previously there was a bug where when we retrieved the list of data streams using a template, we only checked index patterns, rather than actually comparing priorities and only treating the highest priority template as "referenced". This commit fixes this problem by only treating the matching composable template as referenced, allowing unreferenced templates to be safely deleted. Resolves #84188 Resolves #84171
…84376) (#84452) * Allow removing unreferenced composable data stream templates (#84376) Previously there was a bug where when we retrieved the list of data streams using a template, we only checked index patterns, rather than actually comparing priorities and only treating the highest priority template as "referenced". This commit fixes this problem by only treating the matching composable template as referenced, allowing unreferenced templates to be safely deleted. Resolves #84188 Resolves #84171 * Fix compilation for old JDK
Previously there was a bug where when we retrieved the list of data streams using a template, we
only checked index patterns, rather than actually comparing priorities and only treating the highest
priority template as "referenced". This commit fixes this problem by only treating the matching
composable template as referenced, allowing unreferenced templates to be safely deleted.
Resolves #84188
Resolves #84171