-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Cherry-pick #23240 to 7.12: libbeat/template: duplicate entries in fields.yml leads to repeated dynamic templates #24197
Conversation
…ynamic templates (elastic#23240) * libbeat/template: deduplicate dynamic templates In case of duplicate fields, do not generate duplicate dynamic_template items. We already deduplicate field mappings because we update a map. * libbeat/template: preserve dynamic template order (cherry picked from commit c0bfea4)
Pinging @elastic/integrations-services (Team:Services) |
💔 Tests Failed
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪Test errorsExpand to view the tests failures
|
Test | Results |
---|---|
Failed | 1 |
Passed | 46608 |
Skipped | 4975 |
Total | 51584 |
Genuine test errors
💔 There are test failures but not known flaky tests, most likely a genuine test failure.
- Name:
Build&Test / auditbeat-windows-8-windows-8 / TestNonRecursive – github.com/elastic/beats/v7/auditbeat/module/file_integrity/monitor
Cherry-pick of PR #23240 to 7.12 branch. Original message:
What does this PR do?
In case of duplicate fields, do not generate duplicate dynamic_template items. We already deduplicate field mappings because there we update a map.
There's some light refactoring here to stop using a global list of dynamic templates, and instead maintain a map of dynamic templates on the processor.
Why is it important?
As part of APM Server's migration to Fleet and data streams, we now duplicate fields for each data stream. We still need to generate legacy templates for 7.x, so we gather all of these data stream fields.yml files together to generate docs, templates, etc. The combined fields.yml will therefore have duplicate entries.
Checklist
- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration files- [ ] I have added an entry inCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
N/A
Related issues
elastic/apm-server#4576