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

[ML] Anomaly Detection: Fix button switch issue with unmounted component. #148239

Merged
merged 3 commits into from
Jan 4, 2023

Conversation

walterra
Copy link
Contributor

Summary

Part of #148228.

The AnomalyResultsViewSelector component occasionally triggered a React error Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.. This PR adds a check to only call navigateToPath if the component is still mounted.

@walterra walterra added bug Fixes for quality problems that affect the customer experience release_note:fix :ml Feature:Anomaly Detection ML anomaly detection v8.7.0 labels Dec 30, 2022
@walterra walterra self-assigned this Dec 30, 2022
@walterra walterra marked this pull request as ready for review December 30, 2022 14:04
@walterra walterra requested a review from a team as a code owner December 30, 2022 14:04
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@walterra walterra requested review from alvarezmelissa87 and removed request for qn895 January 3, 2023 09:00
@kibana-ci
Copy link
Collaborator

💚 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
ml 3.4MB 3.4MB +102.0B

History

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

cc @walterra

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

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

LGTM ⚡

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

LGTM

@walterra walterra merged commit b4f7aae into elastic:main Jan 4, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jan 4, 2023
@walterra walterra deleted the ml-148228c-explorer-switch-fix branch January 4, 2023 09:47
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting bug Fixes for quality problems that affect the customer experience Feature:Anomaly Detection ML anomaly detection :ml release_note:fix v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants