[System Actions] Complete API audit and update APIs to comply with System Actions#172937
Merged
Zacqary merged 5 commits intoelastic:system_actions_mvpfrom Jan 3, 2024
Merged
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
Contributor
|
Pinging @elastic/response-ops (Team:ResponseOps) |
JiaweiWu
reviewed
Dec 19, 2023
Comment on lines
+27
to
+33
| return { | ||
| id: action.id, | ||
| params: action.params, | ||
| ...(typeof useAlertDataForTemplate !== 'undefined' ? { useAlertDataForTemplate } : {}), | ||
| ...(action.uuid ? { uuid: action.uuid } : {}), | ||
| type: RuleActionTypes.SYSTEM, | ||
| }; |
Contributor
There was a problem hiding this comment.
Let's write some unit tests for this
| })), | ||
| actions: actions.map( | ||
| ({ id, actionTypeId, params, uuid, type, useAlertDataForTemplate, ...action }) => { | ||
| if (type === RuleActionTypes.SYSTEM) { |
Contributor
There was a problem hiding this comment.
Let's write some unit tests for this as well
| verifyAccessAndContext(licenseState, async function (context, req, res) { | ||
| const rulesClient = (await context.alerting).getRulesClient(); | ||
| const actionsClient = (await context.actions).getActionsClient(); | ||
| const { isSystemAction } = (await context.actions).getActionsClient(); |
Contributor
There was a problem hiding this comment.
Do we have E2E test cases to assert the correct output for these endpoints?
Contributor
Author
💔 Build FailedFailed CI Steps
Metrics [docs]
HistoryTo update your PR or re-run it, just comment with: |
Contributor
Author
|
@JiaweiWu ready for review Note that CI is failing because we're pushing to a feature branch and it can't seem to find the build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #172168
This updates the legacy
rewriteActionsReqandrewriteRuletransforms to be compatible with System Actions, and replaces all uses of legacyrewriteActionsReswithtransformRuleActions, which is already System Actions-compliant.Affected APIs are:
_clone_find_get_update