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] Stack trace error shows up when changing actions on a detection rule #83230

Closed
FrankHassanabad opened this issue Nov 11, 2020 · 1 comment
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Detection Rules Anything related to Security Solution's Detection Rules fixed impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v7.10.1

Comments

@FrankHassanabad
Copy link
Contributor

Describe the bug:

When you're modifying a rule and you change the action from daily to hourly, etc... you get a stack trace in your console:

Screen Shot 2020-11-11 at 4 24 24 PM

Looks like this is within a props.handleChange not being there
Screen Shot 2020-11-11 at 4 26 36 PM

From file:

securitySolution/x-pack/plugins/security_solution/public/detections/components/rules/throttle_select_field/index.tsx

Kibana/Elasticsearch Stack version:
7.10.0

Steps to reproduce:

  1. Go to a rule on detections page
  2. Edit the rule and add an action
  3. Edit the action and change it from one setting to another one

Screen Shot 2020-11-11 at 4 39 21 PM

Current behavior:
It throws a stack trace.

Expected behavior:
No stack trace.

@FrankHassanabad FrankHassanabad added bug Fixes for quality problems that affect the customer experience impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Feature:Detection Rules Anything related to Security Solution's Detection Rules Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. labels Nov 11, 2020
@spong spong removed their assignment Nov 19, 2020
rylnd added a commit to rylnd/kibana that referenced this issue Nov 23, 2020
Addresses elastic#83230.

This field was previously refactored to not require a callback prop;
simply updating the value via `field.setValue` is sufficient for our use
case.

This fix removes the errant code that assumed a callback prop, since
such a prop does not exist on the underlying component.
rylnd added a commit that referenced this issue Nov 24, 2020
* Prevent error from being displayed when choosing action throttle

Addresses #83230.

This field was previously refactored to not require a callback prop;
simply updating the value via `field.setValue` is sufficient for our use
case.

This fix removes the errant code that assumed a callback prop, since
such a prop does not exist on the underlying component.

* Fix UI bug on ML Jobs popover

EUI links now add an SVG if they're an external link; our use of a div
was causing that to wrap. Since the div was only needed to change the
text size, a refactor makes this all work.

* Exercise editing of tags in E2E tests

These tests were recently skipped due to their improper teardown. Since
that's a broader issue across most of these tests, I'm reopening these
so we can get the coverage provided here for the time being.

* useFetchIndex defaults to isLoading: false

In the case where no index pattern is provided, the hook exits without
doing any work but does not update the loading state; this had the
downstream effect of disabling a form field that was waiting for this
hook to stop loading.

* Move situational action into ... the situation

We only need to clear existing tags in the case where we're editing the
rule (and it has tags); in all other cases, this method fails. This
fixes things by moving that conditional logic (clear the tags field)
into the test that needs it (editing custom rules).
rylnd added a commit to rylnd/kibana that referenced this issue Nov 24, 2020
* Prevent error from being displayed when choosing action throttle

Addresses elastic#83230.

This field was previously refactored to not require a callback prop;
simply updating the value via `field.setValue` is sufficient for our use
case.

This fix removes the errant code that assumed a callback prop, since
such a prop does not exist on the underlying component.

* Fix UI bug on ML Jobs popover

EUI links now add an SVG if they're an external link; our use of a div
was causing that to wrap. Since the div was only needed to change the
text size, a refactor makes this all work.

* Exercise editing of tags in E2E tests

These tests were recently skipped due to their improper teardown. Since
that's a broader issue across most of these tests, I'm reopening these
so we can get the coverage provided here for the time being.

* useFetchIndex defaults to isLoading: false

In the case where no index pattern is provided, the hook exits without
doing any work but does not update the loading state; this had the
downstream effect of disabling a form field that was waiting for this
hook to stop loading.

* Move situational action into ... the situation

We only need to clear existing tags in the case where we're editing the
rule (and it has tags); in all other cases, this method fails. This
fixes things by moving that conditional logic (clear the tags field)
into the test that needs it (editing custom rules).
rylnd added a commit that referenced this issue Nov 25, 2020
* Prevent error from being displayed when choosing action throttle

Addresses #83230.

This field was previously refactored to not require a callback prop;
simply updating the value via `field.setValue` is sufficient for our use
case.

This fix removes the errant code that assumed a callback prop, since
such a prop does not exist on the underlying component.

* Fix UI bug on ML Jobs popover

EUI links now add an SVG if they're an external link; our use of a div
was causing that to wrap. Since the div was only needed to change the
text size, a refactor makes this all work.

* Exercise editing of tags in E2E tests

These tests were recently skipped due to their improper teardown. Since
that's a broader issue across most of these tests, I'm reopening these
so we can get the coverage provided here for the time being.

* useFetchIndex defaults to isLoading: false

In the case where no index pattern is provided, the hook exits without
doing any work but does not update the loading state; this had the
downstream effect of disabling a form field that was waiting for this
hook to stop loading.

* Move situational action into ... the situation

We only need to clear existing tags in the case where we're editing the
rule (and it has tags); in all other cases, this method fails. This
fixes things by moving that conditional logic (clear the tags field)
into the test that needs it (editing custom rules).
rylnd added a commit that referenced this issue Nov 25, 2020
* Prevent error from being displayed when choosing action throttle

Addresses #83230.

This field was previously refactored to not require a callback prop;
simply updating the value via `field.setValue` is sufficient for our use
case.

This fix removes the errant code that assumed a callback prop, since
such a prop does not exist on the underlying component.

* Fix UI bug on ML Jobs popover

EUI links now add an SVG if they're an external link; our use of a div
was causing that to wrap. Since the div was only needed to change the
text size, a refactor makes this all work.

* Exercise editing of tags in E2E tests

These tests were recently skipped due to their improper teardown. Since
that's a broader issue across most of these tests, I'm reopening these
so we can get the coverage provided here for the time being.

* useFetchIndex defaults to isLoading: false

In the case where no index pattern is provided, the hook exits without
doing any work but does not update the loading state; this had the
downstream effect of disabling a form field that was waiting for this
hook to stop loading.

* Move situational action into ... the situation

We only need to clear existing tags in the case where we're editing the
rule (and it has tags); in all other cases, this method fails. This
fixes things by moving that conditional logic (clear the tags field)
into the test that needs it (editing custom rules).
@rylnd rylnd added the fixed label Nov 25, 2020
@ghost
Copy link

ghost commented Nov 26, 2020

Hi @FrankHassanabad

We have validated this issue on "7.10.1-SNAPSHOT" and found that issue is Fixed. No error is thrown on Changing the Rule frequency of the created rule and created 01 New Test-Case for the same.

Build details:

Platform : Staging
Version : 7.10.1
Commit:8429d582611223b275fe05c987b06583744c52c2
Build number : 36023

Artifact Page : https://artifacts-api.elastic.co/v1/search/7.10.1-SNAPSHOT


Test-Case Creation :

  • Created 01 Test-Cases
Test-Case Link Title Remark
C35167 Validate the Changing Rule Action Frequency should not throw Error -

Test-Case Execution :

Test-Case Link Title Staus
C35167 Validate the Changing Rule Action Frequency should not throw Error Pass

C.C @MadameSheema

Please let us known if we are missing something. we will close this issue once BC build for 7.10.1 will be available.

thanks !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Detection Rules Anything related to Security Solution's Detection Rules fixed impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v7.10.1
Projects
None yet
Development

No branches or pull requests

5 participants