[Console] Fix parsing requests with errors#215568
Conversation
|
Pinging @elastic/kibana-management (Team:Kibana Management) |
sabarasaba
left a comment
There was a problem hiding this comment.
Awesome work @ElenaStoeva, so happy to see this one finally fixed! Code changes lgtm, this already works soooo much better than what we currently have so I'm happy to merge as is.
I did noticed a small "bug" in which the request boundary overextends to the next request comment if it contains an error. If it's too complex to fix I'd say skip it though:
Thanks for the review @sabarasaba and that's a great point! I added an enhancement with be8c6d6 so that we reset the parser at the next comment or the next request, whichever comes first: Screen.Recording.2025-03-27.at.14.47.25.mov |
|
Starting backport for target branches: 8.x, 9.0 https://github.com/elastic/kibana/actions/runs/14202128156 |
💛 Build succeeded, but was flaky
Failed CI StepsTest FailuresMetrics [docs]Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
History
cc @ElenaStoeva |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
Fixes elastic#211031 ## Summary This PR fixes the selection of requests in Console when a request contains an error. It also adds an error toast when the user tries to send a request containing an error, as the response from Elasticsearch is usually too long and not very helpful. https://github.com/user-attachments/assets/4de10953-9ee5-489b-94fb-fd8a772bd598 (cherry picked from commit 4557b73) # Conflicts: # src/platform/packages/shared/kbn-monaco/src/console/console_parsed_requests_provider.ts # src/platform/packages/shared/kbn-monaco/src/console/parser.test.ts
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
5 similar comments
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
# Backport This will backport the following commits from `main` to `8.x`: - [[Console] Fix parsing requests with errors (#215568)](#215568) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Elena Stoeva","email":"59341489+ElenaStoeva@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-04-01T17:28:24Z","message":"[Console] Fix parsing requests with errors (#215568)\n\nFixes https://github.com/elastic/kibana/issues/211031\n\n## Summary\n\nThis PR fixes the selection of requests in Console when a request\ncontains an error. It also adds an error toast when the user tries to\nsend a request containing an error, as the response from Elasticsearch\nis usually too long and not very helpful.\n\n\n\n\nhttps://github.com/user-attachments/assets/4de10953-9ee5-489b-94fb-fd8a772bd598","sha":"4557b7395940710e0ba2b9fde828d07aa30315e3","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Console","Team:Kibana Management","release_note:skip","backport:prev-minor","v9.1.0","v8.19.0"],"title":"[Console] Fix parsing requests with errors","number":215568,"url":"https://github.com/elastic/kibana/pull/215568","mergeCommit":{"message":"[Console] Fix parsing requests with errors (#215568)\n\nFixes https://github.com/elastic/kibana/issues/211031\n\n## Summary\n\nThis PR fixes the selection of requests in Console when a request\ncontains an error. It also adds an error toast when the user tries to\nsend a request containing an error, as the response from Elasticsearch\nis usually too long and not very helpful.\n\n\n\n\nhttps://github.com/user-attachments/assets/4de10953-9ee5-489b-94fb-fd8a772bd598","sha":"4557b7395940710e0ba2b9fde828d07aa30315e3"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/215568","number":215568,"mergeCommit":{"message":"[Console] Fix parsing requests with errors (#215568)\n\nFixes https://github.com/elastic/kibana/issues/211031\n\n## Summary\n\nThis PR fixes the selection of requests in Console when a request\ncontains an error. It also adds an error toast when the user tries to\nsend a request containing an error, as the response from Elasticsearch\nis usually too long and not very helpful.\n\n\n\n\nhttps://github.com/user-attachments/assets/4de10953-9ee5-489b-94fb-fd8a772bd598","sha":"4557b7395940710e0ba2b9fde828d07aa30315e3"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
|
Starting backport for target branches: 8.19 https://github.com/elastic/kibana/actions/runs/15729611470 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
Fixes elastic#211031 ## Summary This PR fixes the selection of requests in Console when a request contains an error. It also adds an error toast when the user tries to send a request containing an error, as the response from Elasticsearch is usually too long and not very helpful. https://github.com/user-attachments/assets/4de10953-9ee5-489b-94fb-fd8a772bd598 (cherry picked from commit 4557b73) # Conflicts: # src/platform/packages/shared/kbn-monaco/src/console/console_parsed_requests_provider.ts # src/platform/packages/shared/kbn-monaco/src/console/parser.test.ts # src/platform/plugins/shared/console/public/application/containers/editor/monaco_editor_actions_provider.ts

Fixes #211031
Fixes #213131
Summary
This PR fixes the selection of requests in Console when a request contains an error. It also adds an error toast when the user tries to send a request containing an error, as the response from Elasticsearch is usually too long and not very helpful.
Screen.Recording.2025-03-21.at.19.26.08.mov