Skip to content

[Console] Only show ESQL suggestions in ESQL query request#240264

Merged
ElenaStoeva merged 6 commits intoelastic:mainfrom
ElenaStoeva:console/suggest-esql-in-correct-request
Oct 27, 2025
Merged

[Console] Only show ESQL suggestions in ESQL query request#240264
ElenaStoeva merged 6 commits intoelastic:mainfrom
ElenaStoeva:console/suggest-esql-in-correct-request

Conversation

@ElenaStoeva
Copy link
Contributor

@ElenaStoeva ElenaStoeva commented Oct 23, 2025

Closes #225685

Summary

Previously, ESQL suggestions were shown inside all query body params ("query": "... or "query": """...). However, there are some requests with a query body param that don't work with ESLQ (e.g. SQL query). This PR makes sure that ESQL suggestions are only displayed inside POST _query request (which is the request for sending ESQL queries).

How to test:

Verify that ESQL suggestions are displayed in POST _query requests:

POST /_query
{
  "query": "..."
}

Verify that ESQL suggestions are not displayed in any other requests; for example:

POST /_sql
{
  "query": "...."
}

@ElenaStoeva ElenaStoeva self-assigned this Oct 23, 2025
@ElenaStoeva ElenaStoeva requested review from a team as code owners October 23, 2025 11:37
@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 backport:skip This PR does not require backporting labels Oct 23, 2025
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@eokoneyo eokoneyo left a comment

Choose a reason for hiding this comment

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

Approving to unblock code domain is actually kibana Management

@ElenaStoeva ElenaStoeva force-pushed the console/suggest-esql-in-correct-request branch from b14a8cb to 17f3e56 Compare October 27, 2025 11:17
Copy link
Contributor

@SoniaSanzV SoniaSanzV left a comment

Choose a reason for hiding this comment

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

tested locally, lgtm :)

@elasticmachine
Copy link
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
console 197.6KB 197.7KB +150.0B

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 4.0MB 4.0MB +158.0B

History

cc @ElenaStoeva

@ElenaStoeva ElenaStoeva merged commit 7f03a89 into elastic:main Oct 27, 2025
13 checks passed
ElenaStoeva added a commit that referenced this pull request Nov 3, 2025
Follow-up to #240264

## Summary

This PR fixes a small regression introduced by
#240264, where ESQL suggestions
are no longer displayed for `_query/async` endpoints and they should be.

With this change, ESQL suggesstions should be displayed for the
following endpoints:

`_query`
`/_query`
`_query?...`
`/_query?...`
`_query/async`
`/_query/async`
`_query/async?...`
`/_query/async?...`
@ElenaStoeva ElenaStoeva deleted the console/suggest-esql-in-correct-request branch January 31, 2026 19:49
@ElenaStoeva ElenaStoeva added v8.19.13 v9.2.7 backport:version Backport to applied version labels and removed backport:skip This PR does not require backporting labels Feb 26, 2026
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.2, 9.3

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

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.2, 9.3

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

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Feb 26, 2026
…40264)

Closes elastic#225685

## Summary

Previously, ESQL suggestions were shown inside all `query` body params
(`"query": "...` or `"query": """...`). However, there are some requests
with a `query` body param that don't work with ESLQ (e.g. SQL query).
This PR makes sure that ESQL suggestions are only displayed inside `POST
_query` request (which is the request for sending ESQL queries).

**How to test:**

Verify that ESQL suggestions are displayed in `POST _query` requests:

```
POST /_query
{
  "query": "..."
}
```

Verify that ESQL suggestions are **not** displayed in any other
requests; for example:

```
POST /_sql
{
  "query": "...."
}
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 7f03a89)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.19 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.19:
- [Console] Fix autoselecting last request (#218001)
9.2
9.3 Backport failed because of merge conflicts

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 240264

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Feb 26, 2026
…40264)

Closes elastic#225685

## Summary

Previously, ESQL suggestions were shown inside all `query` body params
(`"query": "...` or `"query": """...`). However, there are some requests
with a `query` body param that don't work with ESLQ (e.g. SQL query).
This PR makes sure that ESQL suggestions are only displayed inside `POST
_query` request (which is the request for sending ESQL queries).

**How to test:**

Verify that ESQL suggestions are displayed in `POST _query` requests:

```
POST /_query
{
  "query": "..."
}
```

Verify that ESQL suggestions are **not** displayed in any other
requests; for example:

```
POST /_sql
{
  "query": "...."
}
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 7f03a89)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.19 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.19:
- [Console] Fix autoselecting last request (#218001)
9.2
9.3 Backport failed because of merge conflicts

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 240264

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Feb 26, 2026
…0264) (#255098)

# Backport

This will backport the following commits from `main` to `9.2`:
- [[Console] Only show ESQL suggestions in ESQL query request
(#240264)](#240264)

<!--- 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-10-27T14:48:54Z","message":"[Console]
Only show ESQL suggestions in ESQL query request (#240264)\n\nCloses
https://github.com/elastic/kibana/issues/225685\n\n##
Summary\n\nPreviously, ESQL suggestions were shown inside all `query`
body params\n(`\"query\": \"...` or `\"query\": \"\"\"...`). However,
there are some requests\nwith a `query` body param that don't work with
ESLQ (e.g. SQL query).\nThis PR makes sure that ESQL suggestions are
only displayed inside `POST\n_query` request (which is the request for
sending ESQL queries).\n\n**How to test:**\n\nVerify that ESQL
suggestions are displayed in `POST _query` requests:\n\n```\nPOST
/_query\n{\n \"query\": \"...\"\n}\n```\n\nVerify that ESQL suggestions
are **not** displayed in any other\nrequests; for example:\n\n```\nPOST
/_sql\n{\n \"query\": \"....\"\n}\n```\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"7f03a89707f337416f3b898be884f9f81280e837","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Console","Team:Kibana
Management","release_note:skip","backport:version","v9.3.0","v9.4.0","v8.19.13","v9.2.7"],"title":"[Console]
Only show ESQL suggestions in ESQL query
request","number":240264,"url":"https://github.com/elastic/kibana/pull/240264","mergeCommit":{"message":"[Console]
Only show ESQL suggestions in ESQL query request (#240264)\n\nCloses
https://github.com/elastic/kibana/issues/225685\n\n##
Summary\n\nPreviously, ESQL suggestions were shown inside all `query`
body params\n(`\"query\": \"...` or `\"query\": \"\"\"...`). However,
there are some requests\nwith a `query` body param that don't work with
ESLQ (e.g. SQL query).\nThis PR makes sure that ESQL suggestions are
only displayed inside `POST\n_query` request (which is the request for
sending ESQL queries).\n\n**How to test:**\n\nVerify that ESQL
suggestions are displayed in `POST _query` requests:\n\n```\nPOST
/_query\n{\n \"query\": \"...\"\n}\n```\n\nVerify that ESQL suggestions
are **not** displayed in any other\nrequests; for example:\n\n```\nPOST
/_sql\n{\n \"query\": \"....\"\n}\n```\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"7f03a89707f337416f3b898be884f9f81280e837"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","9.2"],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/240264","number":240264,"mergeCommit":{"message":"[Console]
Only show ESQL suggestions in ESQL query request (#240264)\n\nCloses
https://github.com/elastic/kibana/issues/225685\n\n##
Summary\n\nPreviously, ESQL suggestions were shown inside all `query`
body params\n(`\"query\": \"...` or `\"query\": \"\"\"...`). However,
there are some requests\nwith a `query` body param that don't work with
ESLQ (e.g. SQL query).\nThis PR makes sure that ESQL suggestions are
only displayed inside `POST\n_query` request (which is the request for
sending ESQL queries).\n\n**How to test:**\n\nVerify that ESQL
suggestions are displayed in `POST _query` requests:\n\n```\nPOST
/_query\n{\n \"query\": \"...\"\n}\n```\n\nVerify that ESQL suggestions
are **not** displayed in any other\nrequests; for example:\n\n```\nPOST
/_sql\n{\n \"query\": \"....\"\n}\n```\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"7f03a89707f337416f3b898be884f9f81280e837"}},{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.13","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.2","label":"v9.2.7","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Elena Stoeva <59341489+ElenaStoeva@users.noreply.github.com>
@ElenaStoeva ElenaStoeva added v8.19.13 backport:version Backport to applied version labels and removed v8.19.13 backport:version Backport to applied version labels labels Feb 26, 2026
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.2, 9.3

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

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts
9.2 Cherrypick failed because the selected commit (7f03a89) is empty. It looks like the commit was already backported in #255098
9.3 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 240264

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 that referenced this pull request Feb 27, 2026
…40264) (#255283)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Console] Only show ESQL suggestions in ESQL query request
(#240264)](#240264)

<!--- Backport version: 10.2.0 -->

### 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-10-27T14:48:54Z","message":"[Console]
Only show ESQL suggestions in ESQL query request (#240264)\n\nCloses
https://github.com/elastic/kibana/issues/225685\n\n##
Summary\n\nPreviously, ESQL suggestions were shown inside all `query`
body params\n(`\"query\": \"...` or `\"query\": \"\"\"...`). However,
there are some requests\nwith a `query` body param that don't work with
ESLQ (e.g. SQL query).\nThis PR makes sure that ESQL suggestions are
only displayed inside `POST\n_query` request (which is the request for
sending ESQL queries).\n\n**How to test:**\n\nVerify that ESQL
suggestions are displayed in `POST _query` requests:\n\n```\nPOST
/_query\n{\n \"query\": \"...\"\n}\n```\n\nVerify that ESQL suggestions
are **not** displayed in any other\nrequests; for example:\n\n```\nPOST
/_sql\n{\n \"query\": \"....\"\n}\n```\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"7f03a89707f337416f3b898be884f9f81280e837","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Console","Team:Kibana
Management","release_note:skip","backport:version","v9.3.0","v9.2.6","v8.19.13","v9.2.7"],"title":"[Console]
Only show ESQL suggestions in ESQL query
request","number":240264,"url":"https://github.com/elastic/kibana/pull/240264","mergeCommit":{"message":"[Console]
Only show ESQL suggestions in ESQL query request (#240264)\n\nCloses
https://github.com/elastic/kibana/issues/225685\n\n##
Summary\n\nPreviously, ESQL suggestions were shown inside all `query`
body params\n(`\"query\": \"...` or `\"query\": \"\"\"...`). However,
there are some requests\nwith a `query` body param that don't work with
ESLQ (e.g. SQL query).\nThis PR makes sure that ESQL suggestions are
only displayed inside `POST\n_query` request (which is the request for
sending ESQL queries).\n\n**How to test:**\n\nVerify that ESQL
suggestions are displayed in `POST _query` requests:\n\n```\nPOST
/_query\n{\n \"query\": \"...\"\n}\n```\n\nVerify that ESQL suggestions
are **not** displayed in any other\nrequests; for example:\n\n```\nPOST
/_sql\n{\n \"query\": \"....\"\n}\n```\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"7f03a89707f337416f3b898be884f9f81280e837"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/240264","number":240264,"mergeCommit":{"message":"[Console]
Only show ESQL suggestions in ESQL query request (#240264)\n\nCloses
https://github.com/elastic/kibana/issues/225685\n\n##
Summary\n\nPreviously, ESQL suggestions were shown inside all `query`
body params\n(`\"query\": \"...` or `\"query\": \"\"\"...`). However,
there are some requests\nwith a `query` body param that don't work with
ESLQ (e.g. SQL query).\nThis PR makes sure that ESQL suggestions are
only displayed inside `POST\n_query` request (which is the request for
sending ESQL queries).\n\n**How to test:**\n\nVerify that ESQL
suggestions are displayed in `POST _query` requests:\n\n```\nPOST
/_query\n{\n \"query\": \"...\"\n}\n```\n\nVerify that ESQL suggestions
are **not** displayed in any other\nrequests; for example:\n\n```\nPOST
/_sql\n{\n \"query\": \"....\"\n}\n```\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"7f03a89707f337416f3b898be884f9f81280e837"}},{"branch":"9.2","label":"v9.2.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/255098","number":255098,"state":"MERGED","mergeCommit":{"sha":"8d2b19194006d7282b33d8f7225a02bff2a2b649","message":"[9.2]
[Console] Only show ESQL suggestions in ESQL query request (#240264)
(#255098)\n\n# Backport\n\nThis will backport the following commits from
`main` to `9.2`:\n- [[Console] Only show ESQL suggestions in ESQL query
request\n(#240264)](https://github.com/elastic/kibana/pull/240264)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Elena Stoeva
<59341489+ElenaStoeva@users.noreply.github.com>"}},{"branch":"8.19","label":"v8.19.13","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
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.13 v9.2.6 v9.2.7 v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Console] Don't suggest ESQL inside non-ESQL query fields

5 participants