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

[7.x] [SIEM] Prevent undefined behavior in our ML popover (#62498) #62524

Merged
merged 1 commit into from
Apr 3, 2020

Conversation

rylnd
Copy link
Contributor

@rylnd rylnd commented Apr 3, 2020

Backports the following commits to 7.x:

* Moves enableDataFeed outside of MLPopover

If we accept our dispatch functions, enableDatafeed can be abstracted as
a pure function. The version bound to popover's dispatch functions is
now named 'handleJobStateChange', as that is the callback it's used for.

* Remove unused component state

We no longer deal with jobs in our local state; that's the
responsibility of the useSiemJobs hook

* Prevent user from initiating multiple job installations

When attempting to run a job from the ML Popover, if the job needs to
first be installed, we set the rest of the jobs to be "loading" while
installation is performed.

Without this change, if users are fast enough they can potentially
trigger multiple rule installations, which is undefined behavior and
leads to failures and bad state in our component.

* Remove unused import
@rylnd rylnd added the backport label Apr 3, 2020
@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / kibana-xpack-agent / Closes and opens signals.Detections Closing signals Closes and opens signals

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 17 times on tracked branches: https://github.com/elastic/kibana/issues/61132


Stack Trace

CypressError: Timed out retrying: expected '0' to equal '105'
    at cypressErr (http://elastic:changeme@localhost:61121/__cypress/runner/cypress_runner.js:138644:9)
    at throwErr (http://elastic:changeme@localhost:61121/__cypress/runner/cypress_runner.js:138577:11)
    at Object.throwErrByPath (http://elastic:changeme@localhost:61121/__cypress/runner/cypress_runner.js:138625:3)
    at retry (http://elastic:changeme@localhost:61121/__cypress/runner/cypress_runner.js:132905:19)
    at onFailFn (http://elastic:changeme@localhost:61121/__cypress/runner/cypress_runner.js:121122:16)
    at tryCatcher (http://elastic:changeme@localhost:61121/__cypress/runner/cypress_runner.js:165465:23)
    at Promise._settlePromiseFromHandler (http://elastic:changeme@localhost:61121/__cypress/runner/cypress_runner.js:163401:31)
    at Promise._settlePromise (http://elastic:changeme@localhost:61121/__cypress/runner/cypress_runner.js:163458:18)
    at Promise._settlePromise0 (http://elastic:changeme@localhost:61121/__cypress/runner/cypress_runner.js:163503:10)
    at Promise._settlePromises (http://elastic:changeme@localhost:61121/__cypress/runner/cypress_runner.js:163578:18)
    at Async../node_modules/bluebird/js/release/async.js.Async._drainQueue (http://elastic:changeme@localhost:61121/__cypress/runner/cypress_runner.js:160190:16)
    at Async../node_modules/bluebird/js/release/async.js.Async._drainQueues (http://elastic:changeme@localhost:61121/__cypress/runner/cypress_runner.js:160200:10)
    at Async.drainQueues (http://elastic:changeme@localhost:61121/__cypress/runner/cypress_runner.js:160074:14)

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

@rylnd rylnd merged commit 91ffafa into elastic:7.x Apr 3, 2020
@rylnd rylnd deleted the backport/7.x/pr-62498 branch April 3, 2020 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants