Skip to content

[enhancement] In esql validation, allow any order of metadata #4579

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

frederikb96
Copy link
Contributor

Pull Request

Issue link(s): #4575

Summary - What I changed

Very simple fix to allow any order of esql metadata by adjusting the regex in the validation check.

When using the metadata in the order referenced in the documentation we get a validation error for ESQL with an error message which makes it difficult to find the problem.

Better is to simply allow this official order of metadata :)

How To Test

Checklist

  • Added a label for the type of pr: bug, enhancement, schema, maintenance, Rule: New, Rule: Deprecation, Rule: Tuning, Hunt: New, or Hunt: Tuning so guidelines can be generated
  • Added the meta:rapid-merge label if planning to merge within 24 hours
  • Secret and sensitive material has been managed correctly
  • Automated testing was updated or added to match the most common scenarios
  • Documentation and comments were added for features that require explanation

Contributor checklist

@frederikb96
Copy link
Contributor Author

  1. I also realized that the check is not validating multiple index patterns correctly, also added the regex for this.
  2. Added support for having newline between "|" and the required "keep" which is often used to structure esql rules in GUI

🙂

@frederikb96
Copy link
Contributor Author

I used flake to get correct line length and updated code.

@Mikaayenson Anything else that needs to be done, or can this be merged? :)

@frederikb96
Copy link
Contributor Author

@Mikaayenson @eric-forte-elastic

Just small ping, if this can be merged too :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport: auto community patch python Internal python for the repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants