Skip to content
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][RAC][Cases] Fix RAC "add to case" functionality from alerts table #116768

Merged
merged 9 commits into from
Nov 3, 2021

Conversation

madirey
Copy link
Contributor

@madirey madirey commented Oct 29, 2021

Summary

There are currently 2 issues when trying to attach an alert to a case. This is fallout from PRs merged before 8.0 FF.

  1. When opening the context menu for selected alerts, the "Add to case" options are not enabled.
    image
  2. After fixing (1), another error is encountered when adding to a new case.
    image

This PR addresses both and reenables the failing Cypress test.

With fix:
image

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:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@madirey madirey requested review from a team as code owners October 29, 2021 13:51
@madirey madirey requested review from academo and joeypoon and removed request for a team October 29, 2021 13:51
@botelastic botelastic bot added the Team:APM All issues that need APM UI Team support label Oct 29, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@madirey madirey changed the title Fix rac add to case [Security Solution][RAC][Cases] Fix RAC "add to case" functionality from alerts table Oct 29, 2021
@madirey madirey removed request for a team, academo and joeypoon October 29, 2021 15:08
@madirey madirey added Feature:Cases Cases feature Feature:RAC label obsolete Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.0.0 and removed Team:APM All issues that need APM UI Team support labels Oct 29, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting-cases (Feature:Cases)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@madirey madirey requested a review from dplumlee October 29, 2021 15:10
@brianseeders brianseeders changed the base branch from main to master October 29, 2021 15:16
Copy link
Contributor

@kqualters-elastic kqualters-elastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

desk tested locally, add to new and add to existing case workflows are working well, lgtm 👍

Copy link
Contributor

@jonathan-buttner jonathan-buttner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally that attaching to case works.

Just a few comments.

@madirey madirey added auto-backport Deprecated - use backport:version if exact versions are needed v8.1.0 labels Oct 29, 2021
@madirey madirey added the release_note:skip Skip the PR/issue when compiling release notes label Nov 3, 2021
@madirey
Copy link
Contributor Author

madirey commented Nov 3, 2021

@jonathan-buttner I believe I have addressed all of your feedback. Thanks so much!

@madirey madirey enabled auto-merge (squash) November 3, 2021 18:49
@madirey madirey merged commit bd97d1f into elastic:main Nov 3, 2021
@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Test Failures

  • [job] [logs] Security Solution Tests / Pagination should be able to change items count per page with the dropdown
  • [job] [logs] Security Solution Tests / Pagination should be able to go to next / previous page
  • [job] [logs] Security Solution Tests / Pagination should have 25 events in the page by default
  • [job] [logs] Security Solution Tests / Pagination should select 25 items per page by default

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
cases 337 342 +5
securitySolution 2754 2755 +1
total +6

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
cases 432 434 +2

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
cases 303.9KB 310.2KB +6.4KB
securitySolution 4.5MB 4.5MB -6.6KB
timelines 236.0KB 236.6KB +620.0B
total +396.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
securitySolution 246.6KB 253.2KB +6.6KB
Unknown metric groups

API count

id before after diff
cases 476 478 +2

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 3, 2021
…rom alerts table (elastic#116768)

* Fix add to case functionality

* Use appropriate owner when attaching an alert to a case

* Use field name constants

* Gotta reskip the test

* Better error handling

* Fix type errors

* Fix tests
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
8.0

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Nov 3, 2021
…rom alerts table (#116768) (#117426)

* Fix add to case functionality

* Use appropriate owner when attaching an alert to a case

* Use field name constants

* Gotta reskip the test

* Better error handling

* Fix type errors

* Fix tests

Co-authored-by: Madison Caldwell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:Cases Cases feature Feature:RAC label obsolete release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.0.0 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants