[Security Solution] Rule Preview Follow-up#121249
Conversation
2771fc3 to
2a8cdbe
Compare
There was a problem hiding this comment.
Is there a reference somewhere that we're using to decide on these noisy thresholds?
There was a problem hiding this comment.
Going based off this comment, I think it was the spec in the original feature as well but we should get product to sign off for certain sure
There was a problem hiding this comment.
a quick git blame show the 1 alert per hour logic committed 14 months ago
There was a problem hiding this comment.
Instead of storing the warnings as a separate array where each invocation only has an entry if the invocation generated a warning, it would be nice to return a single array of objects for both errors and warnings where each invocation always has an entry. E.g.
[
{startedAt: 1st date, errors: [], warnings: []},
{startedAt: 2nd date, errors: [your error object here], warnings: []},
...
]
This way we can (1) easily associated errors and warnings that came from the same rule execution, and (2) we have a place to add more status information for each invocation in the future.
2a8cdbe to
8a7d463
Compare
There was a problem hiding this comment.
@marshallmain is there a good default to use for these messages that already exists? Would display when whatever error/warning occurred didn't have an associated message
There was a problem hiding this comment.
is it possible to have errors & warnings with no message? that's interesting, I think if that's the case we could probably handle it on the frontend with translated strings
There was a problem hiding this comment.
We shouldn't be creating errors or warnings with no message, so ideally we'd enforce that with type checking at some point. For now I think something like Unknown error and Unknown warning would be reasonable ways to represent it if we do run into that case. And if we see Unknown messages in the UI, we should track down where we're creating an error or warning and add a descriptive message.
There was a problem hiding this comment.
a quick git blame show the 1 alert per hour logic committed 14 months ago
x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/index.tsx
Outdated
Show resolved
Hide resolved
...k/plugins/security_solution/public/detections/components/rules/rule_preview/preview_logs.tsx
Outdated
Show resolved
Hide resolved
...ck/plugins/security_solution/public/detections/pages/detection_engine/rules/create/index.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
is it possible to have errors & warnings with no message? that's interesting, I think if that's the case we could probably handle it on the frontend with translated strings
...ty_solution/server/lib/detection_engine/signals/preview/preview_rule_execution_log_client.ts
Outdated
Show resolved
Hide resolved
...k/plugins/security_solution/public/detections/components/rules/rule_preview/preview_logs.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
do the logs have a key defined? I thought the reducer above didn't actually add any keys
...k/plugins/security_solution/public/detections/components/rules/rule_preview/preview_logs.tsx
Outdated
Show resolved
Hide resolved
|
@elasticmachine merge upstream |
914f71e to
465e598
Compare
465e598 to
7199078
Compare
💚 Build Succeeded
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @dplumlee |
|
The following labels were identified as gaps in your version labels and will be added automatically:
If any of these should not be on your pull request, please manually remove them. |
💔 Backport failedThe backport operation could not be completed due to the following error: You can specify it via either:
The backport PRs will be merged automatically after passing CI. To backport manually run: |


Summary
Follow-up to #116374.
Screenshots
Checklist
Delete any items that are not applicable to this PR.
For maintainers