Skip to content

Don't check type for imported required fields#347

Merged
jsoriano merged 3 commits intoelastic:mainfrom
jsoriano:external-required-fields
Jun 3, 2022
Merged

Don't check type for imported required fields#347
jsoriano merged 3 commits intoelastic:mainfrom
jsoriano:external-required-fields

Conversation

@jsoriano
Copy link
Copy Markdown
Member

What does this PR do?

External fields don't have a type in the definition. When checking for presence of fields, don't
check the type on these fields.

Why is it important?

Required fields cannot be imported otherwise, as validation fails for un-resolved fields.

Checklist

Related issues

@jsoriano jsoriano requested a review from andrewkroh May 31, 2022 16:13
@jsoriano jsoriano self-assigned this May 31, 2022
@jsoriano jsoriano marked this pull request as ready for review May 31, 2022 16:14
@jsoriano jsoriano requested a review from a team as a code owner May 31, 2022 16:14
@elasticmachine
Copy link
Copy Markdown

elasticmachine commented May 31, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-06-01T14:29:51.428+0000

  • Duration: 3 min 31 sec

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

andrewkroh
andrewkroh previously approved these changes May 31, 2022
mtojek
mtojek previously approved these changes May 31, 2022

foundFields[datastream][f.Name] = struct{}{}

// Don't check type for external fields.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe drop a link to the PR/issue here. Otherwise, it's scary...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Made it less scary 🙂 Please take another look.

@jsoriano jsoriano dismissed stale reviews from mtojek and andrewkroh via 9324dfb June 1, 2022 14:29
@mtojek mtojek self-requested a review June 3, 2022 11:31
@jsoriano jsoriano merged commit 42b1361 into elastic:main Jun 3, 2022
@jsoriano jsoriano deleted the external-required-fields branch June 3, 2022 11:32
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.

[lint] Validation error when using external ECS @timestamp definition

4 participants