[Fleet] Never delete @custom component templates#214232
[Fleet] Never delete @custom component templates#214232nchaulet merged 1 commit intoelastic:mainfrom
Conversation
|
Pinging @elastic/fleet (Team:Fleet) |
💚 Build Succeeded
Metrics [docs]
cc @nchaulet |
+1 let's backport this. |
|
Starting backport for target branches: 9.0 https://github.com/elastic/kibana/actions/runs/13820392629 |
(cherry picked from commit fc64501)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…4279) # Backport This will backport the following commits from `main` to `9.0`: - [[Fleet] Never delete @Custom component templates (#214232)](#214232) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Nicolas Chaulet","email":"nicolas.chaulet@elastic.co"},"sourceCommit":{"committedDate":"2025-03-12T19:58:40Z","message":"[Fleet] Never delete @Custom component templates (#214232)","sha":"fc64501577284038eef59bb8fc37ea4d80b49827","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","backport:prev-minor","v9.1.0","backport:8.18"],"title":"[Fleet] Never delete @Custom component templates","number":214232,"url":"https://github.com/elastic/kibana/pull/214232","mergeCommit":{"message":"[Fleet] Never delete @Custom component templates (#214232)","sha":"fc64501577284038eef59bb8fc37ea4d80b49827"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/214232","number":214232,"mergeCommit":{"message":"[Fleet] Never delete @Custom component templates (#214232)","sha":"fc64501577284038eef59bb8fc37ea4d80b49827"}}]}] BACKPORT--> Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
|
Starting backport for target branches: 8.18, 9.0 https://github.com/elastic/kibana/actions/runs/13822257272 |
(cherry picked from commit fc64501)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
…14289) # Backport This will backport the following commits from `main` to `8.18`: - [[Fleet] Never delete @Custom component templates (#214232)](#214232) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Nicolas Chaulet","email":"nicolas.chaulet@elastic.co"},"sourceCommit":{"committedDate":"2025-03-12T19:58:40Z","message":"[Fleet] Never delete @Custom component templates (#214232)","sha":"fc64501577284038eef59bb8fc37ea4d80b49827","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:prev-minor","backport:version","v9.1.0","backport:8.18","v8.18.1"],"title":"[Fleet] Never delete @Custom component templates","number":214232,"url":"https://github.com/elastic/kibana/pull/214232","mergeCommit":{"message":"[Fleet] Never delete @Custom component templates (#214232)","sha":"fc64501577284038eef59bb8fc37ea4d80b49827"}},"sourceBranch":"main","suggestedTargetBranches":["8.18"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/214279","number":214279,"state":"MERGED","mergeCommit":{"sha":"ffc575724f73009d5d564b7c896ab162e7880c4e","message":"[9.0] [Fleet] Never delete @Custom component templates (#214232) (#214279)\n\n# Backport\n\nThis will backport the following commits from `main` to `9.0`:\n- [[Fleet] Never delete @Custom component templates\n(#214232)](https://github.com/elastic/kibana/pull/214232)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>"}},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/214232","number":214232,"mergeCommit":{"message":"[Fleet] Never delete @Custom component templates (#214232)","sha":"fc64501577284038eef59bb8fc37ea4d80b49827"}},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
(cherry picked from commit fc64501)
…48736) # Backport This will backport the following commits from `main` to `8.19`: - [[Fleet] Never delete @Custom component templates (#214232)](#214232) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Nicolas Chaulet","email":"nicolas.chaulet@elastic.co"},"sourceCommit":{"committedDate":"2025-03-12T19:58:40Z","message":"[Fleet] Never delete @Custom component templates (#214232)","sha":"fc64501577284038eef59bb8fc37ea4d80b49827","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:version","v8.18.0","v9.1.0","v8.18.1","v8.19.10"],"title":"[Fleet] Never delete @Custom component templates","number":214232,"url":"https://github.com/elastic/kibana/pull/214232","mergeCommit":{"message":"[Fleet] Never delete @Custom component templates (#214232)","sha":"fc64501577284038eef59bb8fc37ea4d80b49827"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/214279","number":214279,"state":"MERGED","mergeCommit":{"sha":"ffc575724f73009d5d564b7c896ab162e7880c4e","message":"[9.0] [Fleet] Never delete @Custom component templates (#214232) (#214279)\n\n# Backport\n\nThis will backport the following commits from `main` to `9.0`:\n- [[Fleet] Never delete @Custom component templates\n(#214232)](https://github.com/elastic/kibana/pull/214232)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>"}},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/214289","number":214289,"state":"MERGED","mergeCommit":{"sha":"e1b94117642e9a1a59773612a1cdf85b67247472","message":"[8.18] [Fleet] Never delete @Custom component templates (#214232) (#214289)\n\n# Backport\n\nThis will backport the following commits from `main` to `8.18`:\n- [[Fleet] Never delete @Custom component templates\n(#214232)](https://github.com/elastic/kibana/pull/214232)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\n---------\n\nCo-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>"}},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/214232","number":214232,"mergeCommit":{"message":"[Fleet] Never delete @Custom component templates (#214232)","sha":"fc64501577284038eef59bb8fc37ea4d80b49827"}},{"branch":"8.19","label":"v8.19.10","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
Summary
Resolve #212518
That PR update the code that delete component template on package removal to make sure we never delete user custom component template ( template ending with `@custom)
Test
You can create some
@customcomponent template for your package and check they are not deleted.I added some unit tests.
I think we should backport this to 8.18 and 9.0 as it seems a really weird behaviour to delete user component templates, especially global ones likes
logs@custom