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.10] [ML] Fix unnecessary trigger of wildcard field type search for ML plugin routes. (#84605) #84682

Merged
merged 1 commit into from
Dec 1, 2020

Conversation

walterra
Copy link
Contributor

@walterra walterra commented Dec 1, 2020

Backports the following commits to 7.10:

…gin routes. (elastic#84605)

Passing in an empty string '' to useResolver() would trigger a wild card search across all indices and fields, potentially causing a timeout and the page would fail to load. The following pages were affected: Single Metric Viewer, Data frame analytics models list, Data frame analytics jobs list, Data frame analytics exploration page, File Data Visualizer (Data visualizer - Import data from a log file). This PR fixes it by passing undefined instead of '' to useResolver to avoid calling _fields_for_wildcard with an empty pattern. Jest tests were added to cover the two parameter scenarios empty string/undefined.

# Conflicts:
#	x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/analytics_job_exploration.tsx
#	x-pack/plugins/ml/public/application/routing/routes/data_frame_analytics/analytics_map.tsx
@walterra walterra self-assigned this Dec 1, 2020
@walterra walterra added the :ml label Dec 1, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@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
ml 11.3MB 11.3MB +762.0B

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

@walterra walterra merged commit fa85f09 into elastic:7.10 Dec 1, 2020
@walterra walterra deleted the backport/7.10/pr-84605 branch December 1, 2020 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants