Skip to content

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

Merged
kibanamachine merged 1 commit intoelastic:8.xfrom
kibanamachine:backport/8.x/pr-193807
Oct 9, 2024
Merged

[8.x] [Response Ops][Alerting] Refactor `ExecutionHandler` stage 2 (#193807)#195676
kibanamachine merged 1 commit intoelastic:8.xfrom
kibanamachine:backport/8.x/pr-193807

Conversation

@kibanamachine
Copy link
Copy Markdown
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 <elasticmachine@users.noreply.github.com>
(cherry picked from commit 9221ab1)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Oct 9, 2024
@kibanamachine kibanamachine enabled auto-merge (squash) October 9, 2024 21:06
@kibanamachine kibanamachine merged commit b44b90d into elastic:8.x Oct 9, 2024
@elasticmachine
Copy link
Copy Markdown
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

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants