-
Notifications
You must be signed in to change notification settings - Fork 511
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
FR] Add Core Support for ES|QL Rule Type #3292
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mikaayenson
added
enhancement
New feature or request
python
Internal python for the repository
Area: DED
esql
ES|QL
labels
Nov 28, 2023
Mikaayenson
requested review from
brokensound77 and
terrancedejesus
as code owners
November 28, 2023 17:30
terrancedejesus
approved these changes
Nov 28, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for base ES|QL rule support.
datasets.update(set(n.value for n in node if isinstance(n, eql.ast.Literal))) | ||
elif isinstance(node, FieldComparison) and str(node.field) == 'event.dataset': | ||
datasets.update(set(str(n) for n in node if isinstance(n, kql.ast.Value))) | ||
if data.type != "esql": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
if data.type != "esql": | |
if getattr(data, 'type', '') != "esql": |
Maybe we should use .get in the event that the type is not set? It looks like we do that in our other checks here.
eric-forte-elastic
approved these changes
Nov 28, 2023
protectionsmachine
pushed a commit
that referenced
this pull request
Nov 28, 2023
(cherry picked from commit bc39c20)
protectionsmachine
pushed a commit
that referenced
this pull request
Nov 28, 2023
(cherry picked from commit bc39c20)
protectionsmachine
pushed a commit
that referenced
this pull request
Nov 28, 2023
(cherry picked from commit bc39c20)
protectionsmachine
pushed a commit
that referenced
this pull request
Nov 28, 2023
(cherry picked from commit bc39c20)
protectionsmachine
pushed a commit
that referenced
this pull request
Nov 28, 2023
(cherry picked from commit bc39c20)
protectionsmachine
pushed a commit
that referenced
this pull request
Nov 28, 2023
(cherry picked from commit bc39c20)
protectionsmachine
pushed a commit
that referenced
this pull request
Nov 28, 2023
(cherry picked from commit bc39c20)
protectionsmachine
pushed a commit
that referenced
this pull request
Nov 28, 2023
(cherry picked from commit bc39c20)
protectionsmachine
pushed a commit
that referenced
this pull request
Nov 28, 2023
(cherry picked from commit bc39c20)
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport: auto
enhancement
New feature or request
esql
ES|QL
python
Internal python for the repository
schema
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issues
https://github.com/elastic/ia-trade-team/issues/163
Summary
Testing
Sample Rule
Use the following rule, and run view-rule command to ensure the esql rule loads successfully, skipping validation.
CLI Testing Commands
Or run:
Output should look similar to the following:
Additional Information