Fix ignored dynamic templates#219875
Conversation
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
ymao1
left a comment
There was a problem hiding this comment.
LGTM. Left a comment about adding a unit test.
| const componentTemplate = getComponentTemplate({ | ||
| fieldMap: mappings.fieldMap, | ||
| dynamic: mappings.dynamic, | ||
| dynamicTemplates: mappings.dynamicTemplates, |
There was a problem hiding this comment.
i would add a unit test to the getComponent template function to verify this is passed through
There was a problem hiding this comment.
added a unit test
|
Pinging @elastic/response-ops (Team:ResponseOps) |
…l/kibana into fix-ignored-dynamic-templates
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
|
|
Starting backport for target branches: 8.19, 9.0 https://github.com/elastic/kibana/actions/runs/14791684758 |
This PR fixes the bug introduced with: elastic#216719 We didn't pass the dynamic_templates param while creating the component template. The fields were still being added because the fields were marked as `dynamic: true` As the dynamic_template was ignored, the fields were added with an extra mapping like `filedname.keyword` This PR fixes that too. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 8c6c928)
This PR fixes the bug introduced with: elastic#216719 We didn't pass the dynamic_templates param while creating the component template. The fields were still being added because the fields were marked as `dynamic: true` As the dynamic_template was ignored, the fields were added with an extra mapping like `filedname.keyword` This PR fixes that too. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 8c6c928)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `9.0`: - [Fix ignored dynamic templates (#219875)](#219875) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Ersin Erdal","email":"92688503+ersin-erdal@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-05-02T08:28:56Z","message":"Fix ignored dynamic templates (#219875)\n\nThis PR fixes the bug introduced with:\nhttps://github.com//pull/216719\n\nWe didn't pass the dynamic_templates param while creating the component\ntemplate.\nThe fields were still being added because the fields were marked as\n`dynamic: true`\n\nAs the dynamic_template was ignored, the fields were added with an extra\nmapping like `filedname.keyword`\nThis PR fixes that too.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"8c6c928e7cde2233da4145c6e712785acf54c5f9","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:ResponseOps","v9.0.0","backport:version","v9.1.0","v8.19.0","v9.0.1","v9.0.2"],"title":"Fix ignored dynamic templates","number":219875,"url":"https://github.com/elastic/kibana/pull/219875","mergeCommit":{"message":"Fix ignored dynamic templates (#219875)\n\nThis PR fixes the bug introduced with:\nhttps://github.com//pull/216719\n\nWe didn't pass the dynamic_templates param while creating the component\ntemplate.\nThe fields were still being added because the fields were marked as\n`dynamic: true`\n\nAs the dynamic_template was ignored, the fields were added with an extra\nmapping like `filedname.keyword`\nThis PR fixes that too.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"8c6c928e7cde2233da4145c6e712785acf54c5f9"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.19"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/219875","number":219875,"mergeCommit":{"message":"Fix ignored dynamic templates (#219875)\n\nThis PR fixes the bug introduced with:\nhttps://github.com//pull/216719\n\nWe didn't pass the dynamic_templates param while creating the component\ntemplate.\nThe fields were still being added because the fields were marked as\n`dynamic: true`\n\nAs the dynamic_template was ignored, the fields were added with an extra\nmapping like `filedname.keyword`\nThis PR fixes that too.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"8c6c928e7cde2233da4145c6e712785acf54c5f9"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: Ersin Erdal <92688503+ersin-erdal@users.noreply.github.com> Co-authored-by: Ersin Erdal <ersin.erdal@elastic.co>
# Backport This will backport the following commits from `main` to `8.19`: - [Fix ignored dynamic templates (#219875)](#219875) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Ersin Erdal","email":"92688503+ersin-erdal@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-05-02T08:28:56Z","message":"Fix ignored dynamic templates (#219875)\n\nThis PR fixes the bug introduced with:\nhttps://github.com//pull/216719\n\nWe didn't pass the dynamic_templates param while creating the component\ntemplate.\nThe fields were still being added because the fields were marked as\n`dynamic: true`\n\nAs the dynamic_template was ignored, the fields were added with an extra\nmapping like `filedname.keyword`\nThis PR fixes that too.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"8c6c928e7cde2233da4145c6e712785acf54c5f9","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:ResponseOps","v9.0.0","backport:version","v9.1.0","v8.19.0","v9.0.1","v9.0.2"],"title":"Fix ignored dynamic templates","number":219875,"url":"https://github.com/elastic/kibana/pull/219875","mergeCommit":{"message":"Fix ignored dynamic templates (#219875)\n\nThis PR fixes the bug introduced with:\nhttps://github.com//pull/216719\n\nWe didn't pass the dynamic_templates param while creating the component\ntemplate.\nThe fields were still being added because the fields were marked as\n`dynamic: true`\n\nAs the dynamic_template was ignored, the fields were added with an extra\nmapping like `filedname.keyword`\nThis PR fixes that too.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"8c6c928e7cde2233da4145c6e712785acf54c5f9"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.19"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/219875","number":219875,"mergeCommit":{"message":"Fix ignored dynamic templates (#219875)\n\nThis PR fixes the bug introduced with:\nhttps://github.com//pull/216719\n\nWe didn't pass the dynamic_templates param while creating the component\ntemplate.\nThe fields were still being added because the fields were marked as\n`dynamic: true`\n\nAs the dynamic_template was ignored, the fields were added with an extra\nmapping like `filedname.keyword`\nThis PR fixes that too.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"8c6c928e7cde2233da4145c6e712785acf54c5f9"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: Ersin Erdal <92688503+ersin-erdal@users.noreply.github.com> Co-authored-by: Ersin Erdal <ersin.erdal@elastic.co>
…ends-crash * main: (111 commits) [ResponseOps][Rules] Cases action title length too long (elastic#219226) [main] Sync bundled packages with Package Storage (elastic#219839) Fix ignored dynamic templates (elastic#219875) Enforce dependency review by kibana-security workflow (elastic#219262) [Security Solution] [Detections] Removes tech preview text from eql seq suppression ui (elastic#219870) [Security Solution] Fix alerts table potentially not applying alert assignees (elastic#219460) fix(slo): alert deletion (elastic#219876) [AI4DSOC] fix styling to address cutoff when screen is narrow (elastic#219306) [Security Solution][Endpoint] Response action create and history log API updates in of space awareness (elastic#218674) Update publish_oas_docs.sh to deploy Kibana Serverless API docs (elastic#219867) feat(slo): lock resource installation (elastic#219747) [AI4DSOC] Alert flyout code cleanup (elastic#219810) [fleet] fixing `isAgentlessDefault` config usage and readability improvements to `isAgentlessSetupDefault` (elastic#219423) feat(slo): Bulk delete UI (elastic#219634) m1 demo prep (elastic#219588) [Security Solution] Replace sourcerer in EQL tab with dataview picker (elastic#218897) [AI4DSOC] Attack discovery widget follow up follow up (elastic#219849) [AI Assistant] Fix some OpenAI models not accepting temperature for Inference service (elastic#218887) Update dependency msw to ~2.7.5 (main) (elastic#219289) Use new client URLs in doc link service (elastic#219600) ...
|
This PR didn't make it into the latest 9.0.1 BC. Updating the labels. |
This PR fixes the bug introduced with: elastic#216719 We didn't pass the dynamic_templates param while creating the component template. The fields were still being added because the fields were marked as `dynamic: true` As the dynamic_template was ignored, the fields were added with an extra mapping like `filedname.keyword` This PR fixes that too. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This PR fixes the bug introduced with: elastic#216719 We didn't pass the dynamic_templates param while creating the component template. The fields were still being added because the fields were marked as `dynamic: true` As the dynamic_template was ignored, the fields were added with an extra mapping like `filedname.keyword` This PR fixes that too. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This PR fixes the bug introduced with: #216719
We didn't pass the dynamic_templates param while creating the component template.
The fields were still being added because the fields were marked as
dynamic: trueAs the dynamic_template was ignored, the fields were added with an extra mapping like
filedname.keywordThis PR fixes that too.