Skip to content

Comments

[6.x] [ML] Fixes Anomaly Explorer Swimlane race condition, adds tests. (#22814)#22923

Merged
walterra merged 1 commit intoelastic:6.xfrom
walterra:backport/6.x/pr-22814
Sep 11, 2018
Merged

[6.x] [ML] Fixes Anomaly Explorer Swimlane race condition, adds tests. (#22814)#22923
walterra merged 1 commit intoelastic:6.xfrom
walterra:backport/6.x/pr-22814

Conversation

@walterra
Copy link
Contributor

Backports the following commits to 6.x:

…stic#22814)

This PR addresses parts of elastic#22642:
- It gets rid of the use of var that = this;.
- dragSelect's action strings are moved to a constants file.
- Adds jest tests for the ExplorerSwimlane component.

This also fixes the following bugs:
- The way we subscribe listeners to the events of the dragSelect library could result in the same event being triggered multiple times. This in turn could cause race conditions when on each event new data gets fetched but in between angular's scope gets updated and could end up in a non-intended way. The result of this were view-by swimlanes not updating correctly or anomaly charts showing non-related charts. This PR fixes it by filtering out consecutive swimlane click events.
- When the angular based chart container wrapper directive gets destroyed/re-esetup when using the job pick, it missed unmounting the react component, it didn't trigger componentWillUnmount()and didn't unsubscribe from dragSelectListener.
@walterra walterra added the backport This PR is a backport of another PR label Sep 11, 2018
@walterra walterra self-assigned this Sep 11, 2018
@walterra walterra added :ml Feature:ml-results legacy - do not use labels Sep 11, 2018
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@walterra walterra merged commit 704667f into elastic:6.x Sep 11, 2018
@walterra walterra deleted the backport/6.x/pr-22814 branch September 11, 2018 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR Feature:ml-results legacy - do not use :ml

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants