Skip to content
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

[Backport 2.9] Backport 2.x Adds chained alerts (#976) #1008

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport d2d03c6 from #1007

* Adds chained alerts (#976)

* chained alert triggers

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* converge all single node test cases

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* add license headers to files

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* fix workflow not found issue

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* added audit state alerts for doc level monitors

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* add audit alerts in query level monitor

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* temp: upload custom built common utils jar

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* fix get monitor response parsing to include associated_workflows

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* add query level monitor audit alerts tests

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* add audit alerts in bucket level monitor

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* fix workflow tests

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* alerting

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* verify bucket monitor audit alerts and chained alerts in workflow

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* make execution id mandatory

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* revert mapping update in run job method

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* minor fixes in chained alert trigger result

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* fix chained alert triggers tests

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* fix acknowledge chained alert bug

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* revert get alerts change

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* refactor and remove transport actions being invoked in other transport actions

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* add license header

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* scheduled job mapping schema

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* fix ktlint and revert gradle dev set up chanegs

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* fix post delete method and refactor alert mover to add class level logger

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* fix test - pass workflow id in get alerts

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* remove monitor empty filter in get alerts api as there is dedicated api for fetching chained alerts - workflow alerts api

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* fix check for workflow id is empty or null in get alerts action

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* fix alert mover method delegate monitor parsing logic

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* remove common utils jar from repo

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

---------

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

* fix imports

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>

---------

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
(cherry picked from commit d2d03c6)
@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #1008 (62674db) into 2.9 (8d019aa) will decrease coverage by 1.02%.
The diff coverage is 65.00%.

@@             Coverage Diff              @@
##                2.9    #1008      +/-   ##
============================================
- Coverage     75.30%   74.29%   -1.02%     
- Complexity      116      119       +3     
============================================
  Files           144      158      +14     
  Lines          8525     9460     +935     
  Branches       1225     1364     +139     
============================================
+ Hits           6420     7028     +608     
- Misses         1484     1735     +251     
- Partials        621      697      +76     
Impacted Files Coverage Δ
...pensearch/alerting/service/DeleteMonitorService.kt 69.62% <ø> (ø)
...lerting/transport/TransportDeleteWorkflowAction.kt 79.61% <ø> (ø)
...org/opensearch/alerting/workflow/WorkflowRunner.kt 1.16% <0.00%> (-98.84%) ⬇️
...rch/alerting/model/ChainedAlertTriggerRunResult.kt 34.48% <34.48%> (ø)
...g/opensearch/alerting/action/GetMonitorResponse.kt 67.18% <41.93%> (-25.32%) ⬇️
...org/opensearch/alerting/model/WorkflowRunResult.kt 51.16% <50.00%> (+27.16%) ⬆️
.../org/opensearch/alerting/util/ScheduledJobUtils.kt 53.33% <53.33%> (ø)
...rch/alerting/transport/TransportGetAlertsAction.kt 73.91% <55.55%> (-0.17%) ⬇️
...ransport/TransportAcknowledgeChainedAlertAction.kt 61.03% <61.03%> (ø)
...n/kotlin/org/opensearch/alerting/TriggerService.kt 71.62% <62.50%> (-5.97%) ⬇️
... and 25 more

... and 8 files with indirect coverage changes

@eirsep eirsep merged commit 57b2ebf into 2.9 Jul 12, 2023
10 of 16 checks passed
@github-actions github-actions bot deleted the backport/backport-1007-to-2.9 branch July 12, 2023 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants