-
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][Alerts] Remove dead legacy signals code #128328
Conversation
fe76256
to
25f07aa
Compare
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
Pinging @elastic/security-solution (Team: SecuritySolution) |
@@ -134,4 +138,342 @@ describe('buildAlert', () => { | |||
expect(groupId).toEqual(groupIds[0]); | |||
} | |||
}); | |||
|
|||
describe('recursive intersection between objects', () => { |
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.
These tests got lost in the migration - adding them back since "recursively merging objects" is a bit tricky.
@@ -118,3 +117,54 @@ export const buildAlertRoot = ( | |||
[ALERT_GROUP_ID]: generateAlertId(doc), | |||
}; | |||
}; | |||
|
|||
export const objectArrayIntersection = (objects: object[]) => { |
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.
These functions are only being moved from build_bulk_body.ts
.
@marshallmain Tried to run this and the alerts table looks broken to me |
@madirey I've seen that in testing before on It should let you add columns still and display them correctly. |
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
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.
Looks like ResponseOps got pinged for the review for adding the new mock x-pack/plugins/rule_registry/server/utils/create_persistence_rule_type_wrapper.mock.ts
.
If that's all it is for ResponseOps, LGTM
isSavedQueryParams(params) || | ||
isThreatParams(params) | ||
) { | ||
if (!isMachineLearningParams(params)) { |
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.
👍
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.
Thanks for doing this, @marshallmain. Code looks good, performed sanity test.
Summary
Removes code that was used to generate legacy signals and is no longer used. Updates some unit tests that incorrectly relied on the legacy functions and adds appropriate mocks for PersistenceAlertServices.