-
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
Avoid duplicate names in dynamic_templates #18849
Conversation
When multiple dynamic templates are detected for the same field, add the matching type to the template name for uniqueness. closes elastic#17203
Pinging @elastic/integrations (Team:Integrations) |
💔 Tests FailedExpand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
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.
Change LGTM, thank you for submitting it! could you please add a changelog entry?
test failures seem unrelated |
When multiple dynamic templates are detected for the same field, add the matching type to the template name for uniqueness. closes elastic#17203
…-stage-level * upstream/master: [CI] Fix permissions should not fail (elastic#18899) Revert "Allow the Docker image to be run with a random user id (elastic#12905)" (elastic#18872) Add new fields to HAProxy module of Metricbeat (elastic#18523) Avoid duplicate names in dynamic_templates (elastic#18849)
What does this PR do?
When multiple dynamic templates are detected for the same field, add the
matching type to the template name for uniqueness.
Why is it important?
As described in #17203 (comment) the APM Server depends on allowing multiple dynamic templates for the same field, with different matching types. Therefore this PR takes care of adding some unique part to the name rather than failing with an error.
Checklist
- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
This can be tested with APM Server as it creates multiple dynamic templates for the
labels
field.go mod edit -replace github.com/elastic/beats/v7=<path-to-your-local-beats-repo>
.make update apm-server && ./apm-server -e -E setup.template.overwrite=true
apm-8.0.0
and search forlabels_string
,labels_boolean
andlabels_*
.Related issues
Screenshots