-
Notifications
You must be signed in to change notification settings - Fork 94
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
apis for get workflow alerts and acknowledge chained alerts #472
Conversation
Signed-off-by: Surya Sashank Nistala <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #472 +/- ##
============================================
+ Coverage 73.77% 74.37% +0.59%
- Complexity 825 859 +34
============================================
Files 127 129 +2
Lines 5366 5573 +207
Branches 680 683 +3
============================================
+ Hits 3959 4145 +186
- Misses 1106 1125 +19
- Partials 301 303 +2
|
Signed-off-by: Surya Sashank Nistala <[email protected]>
@JvmField | ||
val SUBSCRIBE_FINDINGS_ACTION_TYPE = | ||
ActionType(SUBSCRIBE_FINDINGS_ACTION_NAME, ::SubscribeFindingsResponse) | ||
|
||
val ACKNOWLEDGE_CHAINED_ALERTS_ACTION_TYPE = | ||
ActionType(ACKNOWLEDGE_CHAINED_ALERTS_ACTION_NAME, ::AcknowledgeAlertResponse) |
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.
missing @JvmField
annotation?
@@ -41,6 +42,7 @@ data class Alert( | |||
val actionExecutionResults: List<ActionExecutionResult>, | |||
val aggregationResultBucket: AggregationResultBucket? = null, | |||
val executionId: String? = null, | |||
val associatedAlertIds: List<String>, |
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.
can we make associatedAlertIds
optional also like executionId
?
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.
val findingIds: List<String>, |
I referred findingIds in the same class which is list of string which is only applicable to the doc level alerts. that is not optional and filled with empty list.
This maintains consistency
constructor( | ||
alerts: List<Alert>, | ||
associatedAlerts: List<Alert>, | ||
totalAlerts: Int? |
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.
why is totalAlerts
nullable?
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.
this is a parallel api to get alerts. Keeping it consistent with the response structure of GetAlertsResponse which has totalAlerts as nullable
Signed-off-by: Surya Sashank Nistala <[email protected]>
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-472-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b555e248898a32972567f4f7e94efd21e2872c4f
# Push it to GitHub
git push --set-upstream origin backport/backport-472-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x Then, create a pull request where the |
…ch-project#472) Signed-off-by: Surya Sashank Nistala <[email protected]>
…ch-project#472) Signed-off-by: Surya Sashank Nistala <[email protected]>
…ch-project#472) Signed-off-by: Surya Sashank Nistala <[email protected]>
…ch-project#472) Signed-off-by: Surya Sashank Nistala <[email protected]>
) Signed-off-by: Surya Sashank Nistala <[email protected]>
…ch-project#472) (opensearch-project#473) Signed-off-by: Surya Sashank Nistala <[email protected]> Signed-off-by: AWSHurneyt <[email protected]>
Description
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.