-
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] Utilize SO resolve api for reading rules by id
#112478
[Security Solution] [Platform] Utilize SO resolve api for reading rules by id
#112478
Conversation
0db7505
to
b04475c
Compare
b357bb3
to
56749fa
Compare
@elasticmachine merge upstream |
7a6c4ef
to
3a1f510
Compare
id
...security_solution/public/detections/pages/detection_engine/rules/details/failure_history.tsx
Outdated
Show resolved
Hide resolved
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.
This looks awesome with great tests. Just did an initial code review. I think we were maybe gonna do a quick zoom walkthrough tomorrow (?) so will 👍🏽 after!
x-pack/plugins/security_solution/common/detection_engine/schemas/common/schemas.ts
Show resolved
Hide resolved
...ity_solution/public/detections/pages/detection_engine/rules/details/failure_history.test.tsx
Outdated
Show resolved
Hide resolved
...ity_solution/public/detections/pages/detection_engine/rules/details/failure_history.test.tsx
Outdated
Show resolved
Hide resolved
...security_solution/public/detections/pages/detection_engine/rules/details/failure_history.tsx
Outdated
Show resolved
Hide resolved
...k/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx
Outdated
Show resolved
Hide resolved
...k/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx
Outdated
Show resolved
Hide resolved
b72fd23
to
62fb16f
Compare
...k/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx
Show resolved
Hide resolved
...k/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/test/detection_engine_api_integration/security_and_spaces/tests/read_rules.ts
Outdated
Show resolved
Hide resolved
x-pack/test/detection_engine_api_integration/security_and_spaces/tests/read_rules.ts
Outdated
Show resolved
Hide resolved
x-pack/test/detection_engine_api_integration/security_and_spaces/tests/read_rules.ts
Outdated
Show resolved
Hide resolved
x-pack/test/detection_engine_api_integration/security_and_spaces/tests/read_rules.ts
Outdated
Show resolved
Hide resolved
…d rule leading to an aliasMatch and a migrated rule + accidental inserted rule to lead to a conflict. Also removes the outcome property if it is an exactMatch
fb6d790
to
e29fc03
Compare
💛 Build succeeded, but was flaky
Test FailuresKibana Pipeline / general / Performance Tests.x-pack/test/performance/tests/reporting_dashboard·ts.performance reporting dashbaord downloaded PDF has OK statusStandard Out
Stack Trace
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @dhurley14 |
💔 Backport failed
To backport manually run: |
…ng rules by `id` (#112478) (#114683) * [Security Solution] [Platform] Utilize SO resolve api for reading rules by `id` (#112478) * added outcome to backend routes * adds so resolved property alias_target_id to response * adds UI portion * working URL redirect on aliasMatch - todo -> update rule details page refresh button to use SO resolve. * cleanup * fix integration tests * fix jest tests * cleanup types * fix eslint.. I think vs code formatted this * WIP - undo me, working index.test.ts function * WIP - also undo me, probably * working test for aliasMatch, need to add test for outcome = conflict * add conflict callout when SO resolve yields conflict outcome * code cleanup * fix type issues * small cleanup, fix jest test after undoing changes for getFailingRuleStatus * cleanup tests * add alias_target_id to response validation too * unit test changes * update tests again * add all dependencies to useEffect and prefer useMemo * add type cast * adds integration tests for different outcomes after mocking a migrated rule leading to an aliasMatch and a migrated rule + accidental inserted rule to lead to a conflict. Also removes the outcome property if it is an exactMatch * remove unused import * fix test * functional WIP * cleanup * cleanup * finishing touches to address PR review comments * remove console.error * fix bug where spaces was not typed correctly in the plugin start method here #113983 # Conflicts: # x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_hosts_risk_score.ts # x-pack/plugins/security_solution/public/types.ts * fix eslint * skip 8.0 integration tests for 7.16
Summary
Resolves #109191
Testing
aliasMatch
kibana.dev.yml
->elasticsearch.ignoreVersionMismatch: true
Testing
conflict
const outcome = null; //rule.outcome
const outcome = 'conflict'; //rule?.outcome
This will mock a conflicting saved object _idconflict
Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
For maintainers