-
Notifications
You must be signed in to change notification settings - Fork 24.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
[test] Small enhancement to EcsDynamicTemplatesIT
#110740
Conversation
Pinging @elastic/es-data-management (Team:Data Management) |
Hi @eyalkoren, I've created a changelog YAML for you. |
What is the storage impact of this change? @andrewkroh Has the team by chance look at this? |
@eyalkoren Could you give a quick update with the recent discussion on ECS on what the next steps here are? Do we still need this PR? For anyone looking into this in the future around multiple field types for a single field, some interesting discussions happened here in the past: #53181 |
Since the |
ecs@mappings
to latest ECS and tests to consider normalizerEcsDynamicTemplatesIT
@@ -63,7 +63,7 @@ public class EcsDynamicTemplatesIT extends ESRestTestCase { | |||
|
|||
private static Map<String, Object> ecsDynamicTemplates; | |||
private static Map<String, Map<String, Object>> ecsFlatFieldDefinitions; | |||
private static Map<String, String> ecsFlatMultiFieldDefinitions; | |||
private static Map<String, Map<String, Object>> ecsFlatMultiFieldDefinitions; |
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.
Instead of kipping only the subfield's type, keeping all mappings so we can validate any of them
if (fieldMappings == null) { | ||
fieldMappings = ecsFlatMultiFieldDefinitions.get(fieldName); | ||
} |
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.
The field mappings are either in the top-level mappings or subfields map. We didn't look in the latter before thus error message for subfields was not as descriptive
Fixing an error printing bug and making the tests more extensible.