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

[8.x] [Response Ops][Alerting] Refactor `ExecutionHandler` stage 2 (#193807) #195676

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…#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)
@kibanamachine kibanamachine merged commit b44b90d into elastic:8.x Oct 9, 2024
33 checks passed
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #6 / FilesTable renders single result count properly

Metrics [docs]

✅ unchanged

cc @ymao1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants