-
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] [Detections] Fixes validation on response from find status route #93684
[Security Solution] [Detections] Fixes validation on response from find status route #93684
Conversation
…al failure status
Pinging @elastic/security-solution (Team: SecuritySolution) |
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
…ain backwards compatibility from an API standpoint, also displays 'warning' on UI if a rule's status is partial failure
…e test to check for partial failure not warning
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.
Mostly optional comments, except backporting #91051 to 7.11. Feels like it might be important, but I'm not sure, some careful checking of git history is needed to make sure that this is indeed the only PR related to rule statuses that can be backported. If it's not the only one, this can be risky.
I'll start testing now.
@@ -328,7 +328,10 @@ const RuleDetailsPageComponent = () => { | |||
</EuiFlexItem> | |||
) : ( | |||
<> | |||
<RuleStatus status={currentStatus?.status} statusDate={currentStatus?.status_date}> | |||
<RuleStatus | |||
status={currentStatus?.status === 'partial failure' ? 'warning' : currentStatus?.status} |
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.
Optional: Probably this mapping is not needed, at least in the master branch. Can't be sure about 7.11 branch though, because RuleStatus
component has a different implementation there.
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.
yeah we will have merge conflicts in 7.11 but I'll just make the necessary changes there when this backports.
x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/columns.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/security_solution/common/detection_engine/schemas/common/schemas.ts
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.
Thanks for the fix here @dhurley14! LGTM
💚 Build SucceededMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @dhurley14 |
…nd status route (elastic#93684) * fix validation on response of find status route when rule has a partial failure status * replaces warning in rule status service with partial failure to maintain backwards compatibility from an API standpoint, also displays 'warning' on UI if a rule's status is partial failure * display partial failure as 'warning' on all rules table and update e2e test to check for partial failure not warning * add util function, show 'warning' on monitoring table, fix e2e tests
…nd status route (elastic#93684) * fix validation on response of find status route when rule has a partial failure status * replaces warning in rule status service with partial failure to maintain backwards compatibility from an API standpoint, also displays 'warning' on UI if a rule's status is partial failure * display partial failure as 'warning' on all rules table and update e2e test to check for partial failure not warning * add util function, show 'warning' on monitoring table, fix e2e tests
…nd status route (elastic#93684) * fix validation on response of find status route when rule has a partial failure status * replaces warning in rule status service with partial failure to maintain backwards compatibility from an API standpoint, also displays 'warning' on UI if a rule's status is partial failure * display partial failure as 'warning' on all rules table and update e2e test to check for partial failure not warning * add util function, show 'warning' on monitoring table, fix e2e tests # Conflicts: # x-pack/plugins/security_solution/common/detection_engine/utils.ts # x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx # x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.test.ts # x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.ts # x-pack/test/detection_engine_api_integration/security_and_spaces/tests/create_rules.ts
…nd status route (#93684) (#93857) * fix validation on response of find status route when rule has a partial failure status * replaces warning in rule status service with partial failure to maintain backwards compatibility from an API standpoint, also displays 'warning' on UI if a rule's status is partial failure * display partial failure as 'warning' on all rules table and update e2e test to check for partial failure not warning * add util function, show 'warning' on monitoring table, fix e2e tests # Conflicts: # x-pack/plugins/security_solution/common/detection_engine/utils.ts # x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx # x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.test.ts # x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.ts # x-pack/test/detection_engine_api_integration/security_and_spaces/tests/create_rules.ts
…nd status route (#93684) (#93853) * fix validation on response of find status route when rule has a partial failure status * replaces warning in rule status service with partial failure to maintain backwards compatibility from an API standpoint, also displays 'warning' on UI if a rule's status is partial failure * display partial failure as 'warning' on all rules table and update e2e test to check for partial failure not warning * add util function, show 'warning' on monitoring table, fix e2e tests Co-authored-by: Devin W. Hurley <devin.hurley@elastic.co>
…nd status route (#93684) (#93854) * fix validation on response of find status route when rule has a partial failure status * replaces warning in rule status service with partial failure to maintain backwards compatibility from an API standpoint, also displays 'warning' on UI if a rule's status is partial failure * display partial failure as 'warning' on all rules table and update e2e test to check for partial failure not warning * add util function, show 'warning' on monitoring table, fix e2e tests Co-authored-by: Devin W. Hurley <devin.hurley@elastic.co>
Summary
status
field of SO with 'partial failure' to maintain backwards compatibility.We are storing the status saved object with a 'partial failure' status but displaying it as a 'warning' on the UI.
Checklist
Delete any items that are not applicable to this PR.
For maintainers