Skip to content

[7.10] [ML] Fix unnecessary trigger of wildcard field type search for ML plugin routes. (#84605)#84682

Merged
walterra merged 1 commit intoelastic:7.10from
walterra:backport/7.10/pr-84605
Dec 1, 2020
Merged

[7.10] [ML] Fix unnecessary trigger of wildcard field type search for ML plugin routes. (#84605)#84682
walterra merged 1 commit intoelastic:7.10from
walterra:backport/7.10/pr-84605

Conversation

@walterra
Copy link
Copy Markdown
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 added the backport This PR is a backport of another PR label Dec 1, 2020
@walterra walterra self-assigned this Dec 1, 2020
@walterra walterra added the :ml label Dec 1, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/ml-ui (:ml)

@kibanamachine
Copy link
Copy Markdown
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

Labels

backport This PR is a backport of another PR :ml

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants