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
Elasticsearch Query rule can group by multi-terms #166146
Conversation
@elasticmachine merge upstream |
Pinging @elastic/response-ops (Team:ResponseOps) |
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.
Ran into this while switching data view for the KQL query after selecting multiple group by terms:
Did not see this on main
Sep-13-2023.10-38-43.mp4
) { | ||
errors.termField.push( | ||
i18n.translate('xpack.stackAlerts.esQuery.ui.validation.error.overNumberedTermFieldText', { | ||
defaultMessage: 'Max. 4 terms can be selected', |
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.
nit: should use MAX_SELECTABLE_GROUP_BY_TERMS instead of 4 in message
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.
Done
x-pack/plugins/stack_alerts/server/rule_types/es_query/rule_type_params.ts
Show resolved
Hide resolved
2fff1d7
to
9d6899e
Compare
Thanks for catching this, must be fixed now. |
@ersin-erdal Still seeing a little funky behavior: Create DSL query, select an index and add some terms. Then go back and change the index selection. It looks like the group clears correctly, but once you click into it, the previous terms are still in the input but there's a validation error. I think the previous terms should be completely cleared out of that input? |
8dc8750
to
5786a60
Compare
5786a60
to
0880a27
Compare
Should be fixed this time :) |
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. Verified everything works as expected. Nice job!
x-pack/plugins/stack_alerts/public/rule_types/es_query/validation.ts
Outdated
Show resolved
Hide resolved
…ion.ts Co-authored-by: Ying Mao <ying.mao@elastic.co>
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @ersin-erdal |
Resolves: #163829
This PR allows multiple group-by terms to be selected in Elasticsearch query rule.