-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security Solution] [Platform] Return additional errors during import rule + action migration process #123088
[Security Solution] [Platform] Return additional errors during import rule + action migration process #123088
Conversation
…ld, pre-8.0 action ids with the new migrated action SO ids. Ref: elastic#120975 (comment) for more information
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @dhurley14 |
|
||
type PromiseFromStreams = ImportRulesSchemaDecoded | Error; | ||
|
||
const createMockImportRule = async (rule: ReturnType<typeof getCreateRulesSchemaMock>) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wish we could put mocks in packages to share around!
const result = await swapActionIds(mockAction, soClient); | ||
expect(result).toEqual(mockAction); | ||
expect((result as Error).message).toEqual('failed to query'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if maybe this is a preferred pattern for these? Might need to tweak it a bit, but something like:
expect((result as Error).message).toEqual('failed to query'); | |
await expect(() => swapActionIds(mockAction, soClient)).toThrowErrorMatchingInlineSnapshot('failed to query'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah I like that better. I'll update this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for following up on this update here.
… rule + action migration process (elastic#123088) * exposes additional errors when ES failures occur during the swap of old, pre-8.0 action ids with the new migrated action SO ids. Ref: elastic#120975 (comment) for more information * fix test error Co-authored-by: Kibana Machine <[email protected]> (cherry picked from commit 467d111)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
… rule + action migration process (#123088) (#123329) * exposes additional errors when ES failures occur during the swap of old, pre-8.0 action ids with the new migrated action SO ids. Ref: #120975 (comment) for more information * fix test error Co-authored-by: Kibana Machine <[email protected]> (cherry picked from commit 467d111) Co-authored-by: Devin W. Hurley <[email protected]>
Summary
exposes additional errors when ES failures occur during the swap of old, pre-8.0 action ids with the new migrated action SO ids. Ref: #120975 (comment) for more information
Checklist
Delete any items that are not applicable to this PR.
For maintainers