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 1 #186533

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

[Response Ops][Alerting] Refactor ExecutionHandler Pt 1 #186533

ymao1 opened this issue Jun 20, 2024 · 1 comment · Fixed by #186666
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

  • Rename ExecutionHandler to ActionScheduler.
  • Create the different scheduler classes (SummaryActionScheduler, SystemActionScheduler, PerAlertActionScheduler)
  • In this first stage, we'll split the for-loop currently inside ExecutionHandler.generateExecutables into the appropriate class and combine the returned executables from each scheduler class. For this stage, we'll keep the second for-loop that loops over the executables inside the ExecutionHandler/ActionScheduler class.
@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 self-assigned this Jun 20, 2024
ymao1 added a commit that referenced this issue Jul 22, 2024
Resolves #186533

## Summary

Stage 1 of `ExecutionHandler` refactor:

* Rename `ExecutionHandler` to `ActionScheduler`.
* Create schedulers to handle the 3 different action types
(`SummaryActionScheduler`, `SystemActionScheduler`,
`PerAlertActionScheduler`)
* Splits `ExecutionHandler.generateExecutables` function into the
appropriate action type class and combine the returned executables from
each scheduler class.

GH is not recognizing the rename from `ExecutionHandler` to
`ActionScheduler` so I've called out the primary difference between the
two files (other than the rename) which is to get the executables from
each scheduler class instead of from a `generateExecutables` function.
Removed the `generateExecutables` fn from the `ActionScheduler` and any
associated private helper functions.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
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