Skip to content

[7.x] [ML] Fix unnecessary trigger of wildcard field type search for ML plugin routes. (#84605)#84680

Merged
walterra merged 1 commit intoelastic:7.xfrom
walterra:backport/7.x/pr-84605
Dec 1, 2020
Merged

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

Conversation

@walterra
Copy link
Copy Markdown
Contributor

@walterra walterra commented Dec 1, 2020

Backports the following commits to 7.x:

…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.
@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 5.2MB 5.2MB +388.0B

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

@walterra walterra merged commit 1fd2533 into elastic:7.x Dec 1, 2020
@walterra walterra deleted the backport/7.x/pr-84605 branch December 1, 2020 20:15
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