Skip to content

Assign error code to path_match in manifests#654

Closed
jsoriano wants to merge 1 commit intoelastic:mainfrom
jsoriano:add-error-code-path-match
Closed

Assign error code to path_match in manifests#654
jsoriano wants to merge 1 commit intoelastic:mainfrom
jsoriano:add-error-code-path-match

Conversation

@jsoriano
Copy link
Copy Markdown
Member

@jsoriano jsoriano commented Oct 25, 2023

What does this PR do?

Assign new error code JSE00001 to validation errors raised when data streams define dynamic mappings
with path_match in data stream manifests.

Why is it important?

Since Package Spec v3, it is mandatory to use field files to define fields that can be defined there. This
is the case of dynamic fields with path_match.
We have found that packages using these mappings and dynamic: "runtime" cannot ingest documents
with the error Missing intermediate object labels, likely caused because the parent object doesn't exist
in the mapping.
We should probably make Fleet to create these intermediate objects.
In the meantime, JSE00001 may offer a escape hatch for packages needing this, like in the test package
added in this PR.

After this change, packages with this issue, can add a validation.yml file at the root of the package with
the following content to ignore this error:

errors:
  exclude_checks:
    - JSE00001 # Data stream defines a dynamic mapping in manifest that should be defined in field files.

Checklist

Related issues

@jsoriano jsoriano requested a review from kyungeunni October 25, 2023 09:55
@jsoriano jsoriano self-assigned this Oct 25, 2023
@jsoriano jsoriano requested a review from a team as a code owner October 25, 2023 09:55
@elasticmachine
Copy link
Copy Markdown

💚 Build Succeeded

cc @jsoriano

@jsoriano jsoriano mentioned this pull request Oct 25, 2023
@jsoriano
Copy link
Copy Markdown
Member Author

jsoriano commented Nov 6, 2023

Not needed by now, closing.

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