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

[Response Ops][Alerting] Refactor ExecutionHandler Pt 2 #186534

Closed
ymao1 opened this issue Jun 20, 2024 · 1 comment · Fixed by #193807
Closed

[Response Ops][Alerting] Refactor ExecutionHandler Pt 2 #186534

ymao1 opened this issue Jun 20, 2024 · 1 comment · Fixed by #193807
Assignees
Labels
Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) technical debt Improvement of the software architecture and operational architecture

Comments

@ymao1
Copy link
Contributor

ymao1 commented Jun 20, 2024

More description here: #182181

Blocked by #186533

  • Split the for-loop in ExecutionHandler.run into the appropriate scheduler classes. We can rename the generateExecutables functions into {ActionType}ActionScheduler.run or something like {ActionType}ActionScheduler.getActionsToSchedule which returns the formatted actions to bulk queue.
@ymao1 ymao1 added Feature:Alerting technical debt Improvement of the software architecture and operational architecture Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Jun 20, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@ymao1 ymao1 added the blocked label Jun 20, 2024
@ymao1 ymao1 removed the blocked label Sep 23, 2024
@ymao1 ymao1 closed this as completed in 9221ab1 Oct 9, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Oct 9, 2024
…#193807)

Resolves elastic#186534

## Summary

This PR splits the for-loop in the `ActionScheduler.run` function into
the appropriate scheduler classes. Previously, each scheduler had a
`generateExecutables` function that would return an array of executables
and the `ActionScheduler` would loop through the array and convert the
executable to a scheduleable action depending on whether it was a
per-alert action, summary action or system action. This refactor renames
`generateExecutables` into `getActionsToSchedule` and moves the logic to
convert the executables into a schedulable action into the appropriate
scheduler class.

## To Verify

Create some rules with per-alert and summary and system actions and
verify they are triggered as expected.

---------

Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit 9221ab1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants