-
Notifications
You must be signed in to change notification settings - Fork 102
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
Fix get alerts api to also return chained alerts with default params. and skip audit state alerts #1020
Fix get alerts api to also return chained alerts with default params. and skip audit state alerts #1020
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -310,7 +310,7 @@ object CompositeWorkflowRunner : WorkflowRunner() { | |
.should(boolQuery().mustNot(existsQuery(Alert.ERROR_MESSAGE_FIELD))) | ||
.should(termsQuery(Alert.ERROR_MESSAGE_FIELD, "")) | ||
queryBuilder.must(noErrorQuery) | ||
searchRequest.source().query(queryBuilder) | ||
searchRequest.source().query(queryBuilder).size(9999) | ||
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. why? 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. to make sure we fetch as many alerts as we can 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. We should be paginating through them then. Also isnt there a max of 25 delegate monitors to a workflow? 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. let's revisit this soon |
||
val searchResponse: SearchResponse = monitorCtx.client!!.suspendUntil { monitorCtx.client!!.search(searchRequest, it) } | ||
val alerts = searchResponse.hits.map { hit -> | ||
val xcp = XContentHelper.createParser( | ||
|
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.
If we are still letting this API call get audit alerts, it should be included in ALL. It should not be just for the dashboard use case.
Otherwise, we should not let users see audit alerts through this API and only from the workflow alerts API
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.
If not supporting it in
ALL
is temporary until the front end can fix it, then I am fine with going with this logic as long as we have an open github issue about itThere 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.
AUDIT alerts is a state designed to ållow us to create events which we don't want to get users notified about. That's why they rely on chained alerts to be actionable(notifications/acknowledgement etc)
When we return alerts in the api it would clutter the response.
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.
Created issue to discuss further and reconcile with front end #1021
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.
I think we should make a call on if we want audit alerts here or not now.