Repository navigation
[SearchProfiler] Fix handling of bad profile data and update tab behaviour - #55806
Merged
jloleysens merged 2 commits intoJan 24, 2020
Merged
jloleysens merged 2 commits into
jloleysens merged 2 commits into
Conversation
Also fix tab changing upon subsequent requests
Contributor
|
Pinging @elastic/es-ui (Team:Elasticsearch UI) |
Contributor
💚 Build SucceededTo update your PR or re-run it, just comment with: |
alisonelizabeth
approved these changes
Jan 24, 2020
alisonelizabeth
left a comment
Contributor
There was a problem hiding this comment.
Code LGTM. Tested locally; confirmed fix and verified tab behavior. I think as an improvement to this (not blocking), it would be nice to render a callout message or something indicating the user provided bad profile data, rather than just an empty screen.
jloleysens
added a commit
to jloleysens/kibana
that referenced
this pull request
Jan 24, 2020
…viour (elastic#55806) * Fix searchprofiler's ability to handle badly formed profile data Also fix tab changing upon subsequent requests * Fix comment typo
Contributor
|
TIL 💡 |
jloleysens
added a commit
to jloleysens/kibana
that referenced
this pull request
Jan 27, 2020
…viour (elastic#55806) * Fix searchprofiler's ability to handle badly formed profile data Also fix tab changing upon subsequent requests * Fix comment typo # Conflicts: # x-pack/legacy/plugins/searchprofiler/public/np_ready/application/utils/has_aggregations.ts # x-pack/legacy/plugins/searchprofiler/public/np_ready/application/utils/has_searches.ts # x-pack/plugins/searchprofiler/public/application/components/profile_tree/__tests__/profile_tree.test.tsx # x-pack/plugins/searchprofiler/public/application/containers/main/main.tsx
jloleysens
added a commit
that referenced
this pull request
Jan 27, 2020
…viour (#55806) (#55971) * Fix searchprofiler's ability to handle badly formed profile data Also fix tab changing upon subsequent requests * Fix comment typo # Conflicts: # x-pack/legacy/plugins/searchprofiler/public/np_ready/application/utils/has_aggregations.ts # x-pack/legacy/plugins/searchprofiler/public/np_ready/application/utils/has_searches.ts # x-pack/plugins/searchprofiler/public/application/components/profile_tree/__tests__/profile_tree.test.tsx # x-pack/plugins/searchprofiler/public/application/containers/main/main.tsx Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
patrykkopycinski
pushed a commit
to patrykkopycinski/kibana
that referenced
this pull request
May 6, 2026
…viour (elastic#55806) * Fix searchprofiler's ability to handle badly formed profile data Also fix tab changing upon subsequent requests * Fix comment typo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
There is a less known feature of SearchProfiler that enables users to provide a profile response JSON object in the text editor. When they click "Profile" it detects the presence of profile data, short circuits the network requests and goes straight to rendering a profile tree.
It is not clear how many users actually use this functionality, given that it is not really advertised in the UI, but currently pasting a bad profile (malformed) into the SearchProfiler text editor and clicking profile crashes the app. Steps:
{ "profile": { "shards": [{}] } }into the text editorThis contribution adds a
try..catchto prevent the UI from hard crashing.This contribution also updates auto-setting of tabs under different conditions. If the user is viewing an aggregation, the UI shouldn't switch back to query if they submit another aggregation.
E.g.
This bug should exist on previous Kibana versions too.
Release note
Fixed crash on bad profile data in SearchProfiler.
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.This was checked for cross-browser compatibility, including a check against IE11Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportDocumentation was added for features that require explanation or tutorialsThis was checked for keyboard-only and screenreader accessibilityFor maintainers
This includes a feature addition or change that requires a release note and was labeled appropriately