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][Detections] Rule Form Fixes #84169

Merged
merged 6 commits into from
Nov 24, 2020

Conversation

rylnd
Copy link
Contributor

@rylnd rylnd commented Nov 23, 2020

Summary

Checklist

Delete any items that are not applicable to this PR.

For maintainers

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.
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.
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.
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.
Copy link
Member

@spong spong left a comment

Choose a reason for hiding this comment

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

Checked out, verified fixes locally and all code LGTM! Thanks for the fixes here @rylnd! 🙂

@peluja1012 peluja1012 added the bug Fixes for quality problems that affect the customer experience label Nov 24, 2020
@rylnd
Copy link
Contributor Author

rylnd commented Nov 24, 2020

The cypress tests still seem to be broken. I'm going to leave the test additions but also leave them skipped.
JK I was the one who broke them. Fixed now, leaving them unskipped.

* master: (41 commits)
  [Maps] fix code-owners (elastic#84265)
  [@kbn/utils] Clean target before build (elastic#84253)
  [code coverage] collect for oss integration tests (elastic#83907)
  [APM] Use `asTransactionRate` consistently everywhere (elastic#84213)
  Attempt to fix incremental build error (elastic#84152)
  Unskip "Copy dashboards to space" (elastic#84115)
  Remove expressions.legacy from README (elastic#79681)
  Expression: Add render mode and use it for canvas interactivity (elastic#83559)
  [deb/rpm] Move systemd service to /usr/lib/systemd/system (elastic#83571)
  [Security Solution][Resolver] Allow a configurable entity_id field (elastic#81679)
  [ML] Space permision checks for job deletion (elastic#83871)
  [build] Provide ARM build of RE2 (elastic#84163)
  TSVB should use "histogram:maxBars" and "histogram:barTarget" settings for auto instead of a default 100 buckets (elastic#83628)
  [Workplace Search] Initial rendering of Org Sources (elastic#84164)
  update geckodriver to 0.28 (elastic#84085)
  Fix timelion vis escapes single quotes (elastic#84196)
  [Security Solution] Fix incorrect time for dns histogram (elastic#83532)
  [DX] Bump TS version to v4.1 (elastic#83397)
  [Security Solution] Add endpoint policy revision number (elastic#83982)
  [Fleet] Integration Policies List view (elastic#83634)
  ...
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 marked this pull request as ready for review November 24, 2020 22:00
@rylnd rylnd requested review from a team as code owners November 24, 2020 22:00
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
securitySolution 8.0MB 8.0MB -35.0B

History

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

@rylnd rylnd merged commit 2ce1e09 into elastic:master Nov 24, 2020
@rylnd rylnd deleted the fix_rule_form_bugs branch November 24, 2020 23:04
rylnd added a commit to rylnd/kibana that referenced this pull request 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 pull request 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 pull request 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).
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 release_note:fix Team:Detections and Resp Security Detection Response Team v7.10.1 v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants