Skip to content

Fix validation of dimension fields inside objects#279

Merged
jsoriano merged 1 commit intoelastic:mainfrom
jsoriano:validate-nested-fields
Feb 21, 2022
Merged

Fix validation of dimension fields inside objects#279
jsoriano merged 1 commit intoelastic:mainfrom
jsoriano:validate-nested-fields

Conversation

@jsoriano
Copy link
Member

What does this PR do?

There is a helper to visit a function with all the fields in a package, this helper was not visiting fields nested inside objects. Modify it to visit also nested fields, and "flatten" their names to give better information in error messages.

Why is it important?

  • Fixes validation of dimension fields.
  • Error messages on fields validation provide now the full name of the field.
  • Reduces the risk of incorrectly using this helper again (as was happening to me in Implement package limits #278).

Checklist

Related issues

@jsoriano jsoriano requested a review from a team as a code owner February 17, 2022 19:27
@jsoriano jsoriano self-assigned this Feb 17, 2022
@jsoriano jsoriano mentioned this pull request Feb 17, 2022
12 tasks
@elasticmachine
Copy link

💚 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-02-17T19:27:42.711+0000

  • Duration: 3 min 18 sec

🤖 GitHub comments

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

  • /test : Re-trigger the build.

Copy link
Contributor

@mtojek mtojek 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 d2e3d77 into elastic:main Feb 21, 2022
@jsoriano jsoriano deleted the validate-nested-fields branch February 21, 2022 12:18
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