-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ResponseOps] ES|QL rule type improvements - write query results to the alert doc #184541
Merged
doakalexi
merged 19 commits into
elastic:main
from
doakalexi:write-esql-results-to-alert-doc
Jun 18, 2024
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
2000b5e
Updating to write esql results to the alert doc
doakalexi e06bd7e
Fixing functional tests
doakalexi 63bd38d
Fixing functional test
doakalexi 8af0458
Only map ecs fields
doakalexi 25a2b08
Merge branch 'main' into write-esql-results-to-alert-doc
doakalexi c7ccaf8
Get the intersection
doakalexi a77677d
Merge branch 'write-esql-results-to-alert-doc' of github.com:doakalex…
doakalexi 619268a
Fixing the bundle size
doakalexi 8666077
Updating the stack schema
doakalexi 23d1d5b
Merge branch 'main' into write-esql-results-to-alert-doc
doakalexi e3fabe5
Fixing maps test failure
doakalexi 7191672
Merge branch 'write-esql-results-to-alert-doc' of github.com:doakalex…
doakalexi 5b9159b
Merge branch 'main' into write-esql-results-to-alert-doc
doakalexi e84f295
Adding comment
doakalexi 2c930af
Merge branch 'write-esql-results-to-alert-doc' of github.com:doakalex…
doakalexi 91af172
Merge branch 'main' into write-esql-results-to-alert-doc
doakalexi ff1c0b6
Merge branch 'main' into write-esql-results-to-alert-doc
doakalexi 4f46742
Updating to not flatten the results
doakalexi ab8dcaa
Merge branch 'main' into write-esql-results-to-alert-doc
doakalexi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,8 +36,8 @@ export default function ({ getService }: FtrProviderContext) { | |
return fieldStat.name === 'geo_point'; | ||
} | ||
); | ||
expect(geoPointFieldStats.count).to.be(39); | ||
expect(geoPointFieldStats.index_count).to.be(10); | ||
expect(geoPointFieldStats.count).to.be(47); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you know why these values changed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They changed bc we are now mapping the ecs fields for the stack alert aad index |
||
expect(geoPointFieldStats.index_count).to.be(11); | ||
|
||
const geoShapeFieldStats = apiResponse.cluster_stats.indices.mappings.field_types.find( | ||
(fieldStat: estypes.ClusterStatsFieldTypes) => { | ||
|
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.
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.
Is the
sourceFields
parameter now completely unused, by all the flavors of es query? Not clear too me, but seems like it.If it is, we'll want to "remove" it, though how we do that in a ZDT/BWC safe way is not clear to me. We may have to leave it in the params forever, or something. But was wondering about the
<SourceFields>
element as well - presumably we can get rid of that?I think for now, adding a comment to where sourceFields is defined as a param, indicating the parameter is now ignored, would be good. And then open up a separate issue to "clean up" any remaining references to it, as best we can - unless you know we don't have anything to clean up.
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.
It is still used by the other es query types, just removed for ES|QL. I will add a comment to say the param is ignored now for ES|QL
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.
Resolved in this commit e84f295