Skip to content

[Console] Fix parsing requests with errors#215568

Merged
ElenaStoeva merged 13 commits intoelastic:mainfrom
ElenaStoeva:console/fix-request-with-errors
Apr 1, 2025
Merged

[Console] Fix parsing requests with errors#215568
ElenaStoeva merged 13 commits intoelastic:mainfrom
ElenaStoeva:console/fix-request-with-errors

Conversation

@ElenaStoeva
Copy link
Contributor

@ElenaStoeva ElenaStoeva commented Mar 21, 2025

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

@ElenaStoeva ElenaStoeva added Feature:Console Dev Tools Console Feature Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// release_note:skip Skip the PR/issue when compiling release notes v9.0.0 backport:prev-minor v9.1.0 v8.19.0 labels Mar 21, 2025
@ElenaStoeva ElenaStoeva self-assigned this Mar 21, 2025
@ElenaStoeva ElenaStoeva requested review from a team as code owners March 21, 2025 19:45
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-management (Team:Kibana Management)

Copy link
Member

@sabarasaba sabarasaba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Screenshot 2025-03-27 at 11 53 44

@ElenaStoeva
Copy link
Contributor Author

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

Copy link
Member

@sabarasaba sabarasaba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

latest lgtm, thanks!

@ElenaStoeva ElenaStoeva enabled auto-merge (squash) March 28, 2025 10:23
@ElenaStoeva ElenaStoeva merged commit 4557b73 into elastic:main Apr 1, 2025
9 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x, 9.0

https://github.com/elastic/kibana/actions/runs/14202128156

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #14 / should filter the table correctly

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/monaco 183 184 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
console 185.2KB 185.9KB +737.0B

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/monaco 3 4 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
kbnUiSharedDeps-srcJs 3.6MB 3.6MB +177.0B
Unknown metric groups

API count

id before after diff
@kbn/monaco 183 184 +1

History

cc @ElenaStoeva

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts
9.0 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 215568

Questions ?

Please refer to the Backport tool documentation

@ElenaStoeva
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

ElenaStoeva added a commit to ElenaStoeva/kibana that referenced this pull request Apr 1, 2025
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
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Apr 2, 2025
@kibanamachine
Copy link
Contributor

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

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.

@kibanamachine
Copy link
Contributor

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.

@kibanamachine
Copy link
Contributor

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.

@kibanamachine
Copy link
Contributor

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.

@kibanamachine
Copy link
Contributor

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.

ElenaStoeva added a commit that referenced this pull request Apr 10, 2025
# 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-->
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Apr 10, 2025
@ElenaStoeva ElenaStoeva added backport:version Backport to applied version labels and removed backport:prev-minor labels Jun 18, 2025
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

https://github.com/elastic/kibana/actions/runs/15729611470

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 215568

Questions ?

Please refer to the Backport tool documentation

@ElenaStoeva
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

ElenaStoeva added a commit to ElenaStoeva/kibana that referenced this pull request Jun 18, 2025
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
@ElenaStoeva ElenaStoeva deleted the console/fix-request-with-errors branch January 31, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:Console Dev Tools Console Feature release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DevTools] Run Independent Requests Dev Tools syntax errors outside of curly braces can highlight and possibly execute unintended other commands

5 participants