Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] [Response Ops][Alerting] Refactor `ExecutionHandler` …
…stage 2 (#193807) (#195676) # Backport This will backport the following commits from `main` to `8.x`: - [[Response Ops][Alerting] Refactor `ExecutionHandler` stage 2 (#193807)](#193807) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ying Mao","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-09T21:01:16Z","message":"[Response Ops][Alerting] Refactor `ExecutionHandler` stage 2 (#193807)\n\nResolves https://github.com/elastic/kibana/issues/186534\r\n\r\n## Summary\r\n\r\nThis PR splits the for-loop in the `ActionScheduler.run` function into\r\nthe appropriate scheduler classes. Previously, each scheduler had a\r\n`generateExecutables` function that would return an array of executables\r\nand the `ActionScheduler` would loop through the array and convert the\r\nexecutable to a scheduleable action depending on whether it was a\r\nper-alert action, summary action or system action. This refactor renames\r\n`generateExecutables` into `getActionsToSchedule` and moves the logic to\r\nconvert the executables into a schedulable action into the appropriate\r\nscheduler class.\r\n\r\n## To Verify\r\n\r\nCreate some rules with per-alert and summary and system actions and\r\nverify they are triggered as expected.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"9221ab19e86ca7d3215205110fc709f7ba4739af","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Alerting","release_note:skip","Team:ResponseOps","v9.0.0","backport:prev-minor","v8.16.0"],"title":"[Response Ops][Alerting] Refactor `ExecutionHandler` stage 2","number":193807,"url":"https://github.com/elastic/kibana/pull/193807","mergeCommit":{"message":"[Response Ops][Alerting] Refactor `ExecutionHandler` stage 2 (#193807)\n\nResolves https://github.com/elastic/kibana/issues/186534\r\n\r\n## Summary\r\n\r\nThis PR splits the for-loop in the `ActionScheduler.run` function into\r\nthe appropriate scheduler classes. Previously, each scheduler had a\r\n`generateExecutables` function that would return an array of executables\r\nand the `ActionScheduler` would loop through the array and convert the\r\nexecutable to a scheduleable action depending on whether it was a\r\nper-alert action, summary action or system action. This refactor renames\r\n`generateExecutables` into `getActionsToSchedule` and moves the logic to\r\nconvert the executables into a schedulable action into the appropriate\r\nscheduler class.\r\n\r\n## To Verify\r\n\r\nCreate some rules with per-alert and summary and system actions and\r\nverify they are triggered as expected.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"9221ab19e86ca7d3215205110fc709f7ba4739af"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193807","number":193807,"mergeCommit":{"message":"[Response Ops][Alerting] Refactor `ExecutionHandler` stage 2 (#193807)\n\nResolves https://github.com/elastic/kibana/issues/186534\r\n\r\n## Summary\r\n\r\nThis PR splits the for-loop in the `ActionScheduler.run` function into\r\nthe appropriate scheduler classes. Previously, each scheduler had a\r\n`generateExecutables` function that would return an array of executables\r\nand the `ActionScheduler` would loop through the array and convert the\r\nexecutable to a scheduleable action depending on whether it was a\r\nper-alert action, summary action or system action. This refactor renames\r\n`generateExecutables` into `getActionsToSchedule` and moves the logic to\r\nconvert the executables into a schedulable action into the appropriate\r\nscheduler class.\r\n\r\n## To Verify\r\n\r\nCreate some rules with per-alert and summary and system actions and\r\nverify they are triggered as expected.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"9221ab19e86ca7d3215205110fc709f7ba4739af"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Ying Mao <[email protected]>
- Loading branch information