Skip to content
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

Fix import of object type from ECS #1492

Merged
merged 2 commits into from
Oct 6, 2023

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Oct 6, 2023

Not including object type in object fields can lead to ambiguous interpretations
when installing the mappings. ECS fields of type object include this information,
import it for fields when available.

Object fields must have an object type in Package Spec v3, so this change is
required to import objects from ECS without workarounds.

@jsoriano jsoriano self-assigned this Oct 6, 2023
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @jsoriano

Copy link

@juliaElastic juliaElastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jsoriano jsoriano merged commit 88c7f7c into elastic:main Oct 6, 2023
1 check passed
@jsoriano jsoriano deleted the fix-import-object-mapping branch October 6, 2023 12:50
jsoriano added a commit to elastic/kibana that referenced this pull request Nov 6, 2023
)

For `dynamic: "runtime"`, and possibly other configurations different to
`dynamic: true`, intermediate objects need to exist for dynamic
mappings, otherwise ingestion can fail with `Missing intermediate object`
errors.

This pull request includes these intermediate objects, and avoids the
creation of static properties with wildcards, that is probably not what
is expected for these mappings.

Intermediate objects are included as static properties for parts of the
name before the wildcard, and as dynamic templates when the full path
has wildcards.

In the modified test files are examples of all of these.

This is more an issue since the following recent fixes, that create the
actual dynamic mappings for some cases where only empty objects were
created before.
* elastic/elastic-package#1492
* #168842
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants