apis for get workflow alerts and acknowledge chained alerts#472
apis for get workflow alerts and acknowledge chained alerts#472eirsep merged 3 commits intoopensearch-project:mainfrom
Conversation
Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
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 <snistala@amazon.com>
| 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.
missing @JvmField annotation?
| val actionExecutionResults: List<ActionExecutionResult>, | ||
| val aggregationResultBucket: AggregationResultBucket? = null, | ||
| val executionId: String? = null, | ||
| val associatedAlertIds: List<String>, |
There was a problem hiding this comment.
can we make associatedAlertIds optional also like executionId?
There was a problem hiding this comment.
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.
why is totalAlerts nullable?
There was a problem hiding this comment.
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 <snistala@amazon.com>
|
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.xThen, create a pull request where the |
…ch-project#472) Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
…ch-project#472) Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
…ch-project#472) Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
…ch-project#472) Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
…ch-project#472) (opensearch-project#473) Signed-off-by: Surya Sashank Nistala <snistala@amazon.com> Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
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.