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.x Adds chained alerts (#976) #1007

Merged
merged 2 commits into from
Jul 12, 2023
Merged

Conversation

eirsep
Copy link
Member

@eirsep eirsep commented Jul 12, 2023

Backports #976 to 2.x

  • chained alert triggers

  • converge all single node test cases

  • add license headers to files

  • fix workflow not found issue

  • added audit state alerts for doc level monitors

  • add audit alerts in query level monitor

  • temp: upload custom built common utils jar

  • fix get monitor response parsing to include associated_workflows

  • add query level monitor audit alerts tests

  • add audit alerts in bucket level monitor

  • fix workflow tests

  • alerting

  • verify bucket monitor audit alerts and chained alerts in workflow

  • make execution id mandatory

  • revert mapping update in run job method

  • minor fixes in chained alert trigger result

  • fix chained alert triggers tests

  • fix acknowledge chained alert bug

  • revert get alerts change

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

  • add license header

  • scheduled job mapping schema

  • fix ktlint and revert gradle dev set up chanegs

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

  • fix test - pass workflow id in get alerts

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

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

  • fix alert mover method delegate monitor parsing logic

  • remove common utils jar from repo


Issue #, if available:

Description of changes:

CheckList:

  • Commits are signed per the DCO using --signoff

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.

* chained alert triggers

Signed-off-by: Surya Sashank Nistala <[email protected]>

* converge all single node test cases

Signed-off-by: Surya Sashank Nistala <[email protected]>

* add license headers to files

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix workflow not found issue

Signed-off-by: Surya Sashank Nistala <[email protected]>

* added audit state alerts for doc level monitors

Signed-off-by: Surya Sashank Nistala <[email protected]>

* add audit alerts in query level monitor

Signed-off-by: Surya Sashank Nistala <[email protected]>

* temp: upload custom built common utils jar

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix get monitor response parsing to include associated_workflows

Signed-off-by: Surya Sashank Nistala <[email protected]>

* add query level monitor audit alerts tests

Signed-off-by: Surya Sashank Nistala <[email protected]>

* add audit alerts in bucket level monitor

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix workflow tests

Signed-off-by: Surya Sashank Nistala <[email protected]>

* alerting

Signed-off-by: Surya Sashank Nistala <[email protected]>

* verify bucket monitor audit alerts and chained alerts in workflow

Signed-off-by: Surya Sashank Nistala <[email protected]>

* make execution id mandatory

Signed-off-by: Surya Sashank Nistala <[email protected]>

* revert mapping update in run job method

Signed-off-by: Surya Sashank Nistala <[email protected]>

* minor fixes in chained alert trigger result

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix chained alert triggers tests

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix acknowledge chained alert bug

Signed-off-by: Surya Sashank Nistala <[email protected]>

* revert get alerts change

Signed-off-by: Surya Sashank Nistala <[email protected]>

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

Signed-off-by: Surya Sashank Nistala <[email protected]>

* add license header

Signed-off-by: Surya Sashank Nistala <[email protected]>

* scheduled job mapping schema

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix ktlint and revert gradle dev set up chanegs

Signed-off-by: Surya Sashank Nistala <[email protected]>

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

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix test - pass workflow id in get alerts

Signed-off-by: Surya Sashank Nistala <[email protected]>

* 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 <[email protected]>

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

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix alert mover method delegate monitor parsing logic

Signed-off-by: Surya Sashank Nistala <[email protected]>

* remove common utils jar from repo

Signed-off-by: Surya Sashank Nistala <[email protected]>

---------

Signed-off-by: Surya Sashank Nistala <[email protected]>
@eirsep eirsep added the backport 2.9 backports PRs to 2.9 label Jul 12, 2023
Signed-off-by: Surya Sashank Nistala <[email protected]>
@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #1007 (b721738) into 2.x (d1e4076) will decrease coverage by 1.11%.
The diff coverage is 65.00%.

@@             Coverage Diff              @@
##                2.x    #1007      +/-   ##
============================================
- Coverage     75.27%   74.16%   -1.11%     
- Complexity      116      119       +3     
============================================
  Files           144      158      +14     
  Lines          8525     9460     +935     
  Branches       1225     1364     +139     
============================================
+ Hits           6417     7016     +599     
- Misses         1490     1749     +259     
- Partials        618      695      +77     
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 d2d03c6 into opensearch-project:2.x Jul 12, 2023
11 of 16 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 12, 2023
* Adds chained alerts (#976)

* chained alert triggers

Signed-off-by: Surya Sashank Nistala <[email protected]>

* converge all single node test cases

Signed-off-by: Surya Sashank Nistala <[email protected]>

* add license headers to files

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix workflow not found issue

Signed-off-by: Surya Sashank Nistala <[email protected]>

* added audit state alerts for doc level monitors

Signed-off-by: Surya Sashank Nistala <[email protected]>

* add audit alerts in query level monitor

Signed-off-by: Surya Sashank Nistala <[email protected]>

* temp: upload custom built common utils jar

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix get monitor response parsing to include associated_workflows

Signed-off-by: Surya Sashank Nistala <[email protected]>

* add query level monitor audit alerts tests

Signed-off-by: Surya Sashank Nistala <[email protected]>

* add audit alerts in bucket level monitor

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix workflow tests

Signed-off-by: Surya Sashank Nistala <[email protected]>

* alerting

Signed-off-by: Surya Sashank Nistala <[email protected]>

* verify bucket monitor audit alerts and chained alerts in workflow

Signed-off-by: Surya Sashank Nistala <[email protected]>

* make execution id mandatory

Signed-off-by: Surya Sashank Nistala <[email protected]>

* revert mapping update in run job method

Signed-off-by: Surya Sashank Nistala <[email protected]>

* minor fixes in chained alert trigger result

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix chained alert triggers tests

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix acknowledge chained alert bug

Signed-off-by: Surya Sashank Nistala <[email protected]>

* revert get alerts change

Signed-off-by: Surya Sashank Nistala <[email protected]>

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

Signed-off-by: Surya Sashank Nistala <[email protected]>

* add license header

Signed-off-by: Surya Sashank Nistala <[email protected]>

* scheduled job mapping schema

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix ktlint and revert gradle dev set up chanegs

Signed-off-by: Surya Sashank Nistala <[email protected]>

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

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix test - pass workflow id in get alerts

Signed-off-by: Surya Sashank Nistala <[email protected]>

* 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 <[email protected]>

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

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix alert mover method delegate monitor parsing logic

Signed-off-by: Surya Sashank Nistala <[email protected]>

* remove common utils jar from repo

Signed-off-by: Surya Sashank Nistala <[email protected]>

---------

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix imports

Signed-off-by: Surya Sashank Nistala <[email protected]>

---------

Signed-off-by: Surya Sashank Nistala <[email protected]>
(cherry picked from commit d2d03c6)
eirsep added a commit that referenced this pull request Jul 12, 2023
* Adds chained alerts (#976)

* chained alert triggers

Signed-off-by: Surya Sashank Nistala <[email protected]>

* converge all single node test cases

Signed-off-by: Surya Sashank Nistala <[email protected]>

* add license headers to files

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix workflow not found issue

Signed-off-by: Surya Sashank Nistala <[email protected]>

* added audit state alerts for doc level monitors

Signed-off-by: Surya Sashank Nistala <[email protected]>

* add audit alerts in query level monitor

Signed-off-by: Surya Sashank Nistala <[email protected]>

* temp: upload custom built common utils jar

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix get monitor response parsing to include associated_workflows

Signed-off-by: Surya Sashank Nistala <[email protected]>

* add query level monitor audit alerts tests

Signed-off-by: Surya Sashank Nistala <[email protected]>

* add audit alerts in bucket level monitor

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix workflow tests

Signed-off-by: Surya Sashank Nistala <[email protected]>

* alerting

Signed-off-by: Surya Sashank Nistala <[email protected]>

* verify bucket monitor audit alerts and chained alerts in workflow

Signed-off-by: Surya Sashank Nistala <[email protected]>

* make execution id mandatory

Signed-off-by: Surya Sashank Nistala <[email protected]>

* revert mapping update in run job method

Signed-off-by: Surya Sashank Nistala <[email protected]>

* minor fixes in chained alert trigger result

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix chained alert triggers tests

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix acknowledge chained alert bug

Signed-off-by: Surya Sashank Nistala <[email protected]>

* revert get alerts change

Signed-off-by: Surya Sashank Nistala <[email protected]>

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

Signed-off-by: Surya Sashank Nistala <[email protected]>

* add license header

Signed-off-by: Surya Sashank Nistala <[email protected]>

* scheduled job mapping schema

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix ktlint and revert gradle dev set up chanegs

Signed-off-by: Surya Sashank Nistala <[email protected]>

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

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix test - pass workflow id in get alerts

Signed-off-by: Surya Sashank Nistala <[email protected]>

* 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 <[email protected]>

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

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix alert mover method delegate monitor parsing logic

Signed-off-by: Surya Sashank Nistala <[email protected]>

* remove common utils jar from repo

Signed-off-by: Surya Sashank Nistala <[email protected]>

---------

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix imports

Signed-off-by: Surya Sashank Nistala <[email protected]>

---------

Signed-off-by: Surya Sashank Nistala <[email protected]>
(cherry picked from commit d2d03c6)

Co-authored-by: Surya Sashank Nistala <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.9 backports PRs to 2.9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants