[Alerting] Enable creating system actions through the Create Rule API#167884
[Alerting] Enable creating system actions through the Create Rule API#167884guskovaue merged 29 commits intoelastic:system_actions_mvpfrom
Conversation
|
Pinging @elastic/response-ops (Team:ResponseOps) |
| }), | ||
| }); | ||
|
|
||
| export const rRuleSchema = schema.object({ |
There was a problem hiding this comment.
Why did you decide to copy this schema instead of importing it?
There was a problem hiding this comment.
This was a mistake when I resolved some conflicts with main. Fixed in 71898c9 (#167884)
|
|
||
| const data = { ...initialData, actions: addGeneratedActionValues(initialData.actions) }; | ||
| const systemActions = initialData.actions.filter( | ||
| (action): action is RuleSystemAction => action.type === RuleActionTypes.SYSTEM |
There was a problem hiding this comment.
Can we use special function for this check, we can import from here?
x-pack/plugins/alerting/common/system_actions/is_system_action.ts
There was a problem hiding this comment.
Probably some type issue.
There was a problem hiding this comment.
This is correct. The types of the createRule are not compatible with this function. I tried but I could not make it work.
x-pack/plugins/alerting/server/application/rule/methods/create/create_rule.ts
Show resolved
Hide resolved
| } from '../../../lib'; | ||
| import { BASE_ALERTING_API_PATH } from '../../../../types'; | ||
| import { RouteOptions } from '../../..'; | ||
| import type { |
There was a problem hiding this comment.
This is a mistake. Fixed in 71898c9 (#167884)
x-pack/plugins/alerting/server/application/rule/methods/create/create_rule.ts
Outdated
Show resolved
Hide resolved
| maxScheduledPerMinute: AlertingRulesConfig['maxScheduledPerMinute']; | ||
| connectorAdapterRegistry: ConnectorAdapterRegistry; | ||
| getAlertIndicesAlias: GetAlertIndicesAlias; | ||
| alertsService: AlertsService | null; |
There was a problem hiding this comment.
Lost why did we delete these 2 methods from here?
There was a problem hiding this comment.
Again a mistake when fixing conflicts 🙂. Thanks! Fixed in 71898c9 (#167884)
…so_create_rule_api
…so_create_rule_api
…so_create_rule_api
…so_create_rule_api
This reverts commit 35153ca.
532a1c3 to
83f7167
Compare
💔 Build FailedFailed CI Steps
Test Failures
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @cnasikas |
…API (#168226) Summarize your PR. If it involves visual changes include a screenshot or gif. Depends on: #167871, #167884 ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### For maintainers - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Julia Guskova <iuliia.guskova@elastic.co>
Summary
This PR enables system actions only to the Create Rule API. Other PRs will follow on a subsequent PR.
Depends on: #167871
Related: #160367
Checklist
Delete any items that are not applicable to this PR.
For maintainers