Skip to content

[ES|QL] Follow ups on variables#213040

Merged
stratoula merged 9 commits intoelastic:mainfrom
stratoula:esql-getVarfiables-autocomplete
Mar 10, 2025
Merged

[ES|QL] Follow ups on variables#213040
stratoula merged 9 commits intoelastic:mainfrom
stratoula:esql-getVarfiables-autocomplete

Conversation

@stratoula
Copy link
Contributor

@stratoula stratoula commented Mar 4, 2025

Summary

This PR:

  • add an extra information when hovering over a variable
image
  • passes the variables on the fields retrieval endpoint in the editor to get the fields correctly when there are variables in the query

Checklist

@stratoula stratoula added v9.1.0 v8.19.0 backport:version Backport to applied version labels Feature:ES|QL ES|QL related features in Kibana Team:ESQL ES|QL related features in Kibana t// release_note:skip Skip the PR/issue when compiling release notes labels Mar 4, 2025
@stratoula stratoula marked this pull request as ready for review March 5, 2025 09:48
@stratoula stratoula requested review from a team as code owners March 5, 2025 09:48
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-esql (Team:ESQL)

Copy link
Contributor

@drewdaemon drewdaemon left a comment

Choose a reason for hiding this comment

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

Code seems good!

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/config.ts / Alerting eventLog in space default should generate expected events for normal operation
  • [job] [logs] FTR Configs #53 / discover/security/context_awareness security root profile cell renderers host.name DataView mode should open host.name flyout

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/esql-ast 249 250 +1
@kbn/esql-editor 14 15 +1
@kbn/esql-validation-autocomplete 201 200 -1
@kbn/monaco 186 185 -1
total -0

Async chunks

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

id before after diff
lens 1.5MB 1.5MB +24.0B
stackAlerts 73.2KB 73.2KB +24.0B
total +48.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/esql-ast 26 25 -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 +492.0B
Unknown metric groups

API count

id before after diff
@kbn/esql-ast 313 314 +1
@kbn/esql-editor 37 38 +1
@kbn/esql-validation-autocomplete 213 212 -1
@kbn/monaco 186 185 -1
total -0

History

eokoneyo

This comment was marked as duplicate.

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.

Shared UX changes LGTM

@stratoula stratoula merged commit 90a345b into elastic:main Mar 10, 2025
9 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

@kibanamachine
Copy link
Contributor

💔 All backports failed

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 213040

Questions ?

Please refer to the Backport tool documentation

stratoula added a commit to stratoula/kibana that referenced this pull request Mar 10, 2025
## Summary

This PR:

- add an extra information when hovering over a variable
<img width="479" alt="image"
src="https://github.com/user-attachments/assets/331f7faf-89e9-468d-9887-9d58a2f66ff7"
/>

- passes the variables on the fields retrieval endpoint in the editor to
get the fields correctly when there are variables in the query

### Checklist
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 90a345b)

# Conflicts:
#	src/platform/packages/shared/kbn-monaco/src/esql/lib/hover/helpers.test.ts
#	src/platform/packages/shared/kbn-monaco/src/esql/lib/hover/helpers.ts
#	src/platform/packages/shared/kbn-monaco/src/esql/lib/hover/hover.ts
#	src/platform/packages/shared/kbn-monaco/tsconfig.json
@stratoula
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

stratoula added a commit that referenced this pull request Mar 10, 2025
# Backport

This will backport the following commits from `main` to `8.x`:
- [[ES|QL] Follow ups on variables
(#213040)](#213040)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Stratoula
Kalafateli","email":"efstratia.kalafateli@elastic.co"},"sourceCommit":{"committedDate":"2025-03-10T13:45:27Z","message":"[ES|QL]
Follow ups on variables (#213040)\n\n## Summary\n\nThis PR:\n\n- add an
extra information when hovering over a variable\n<img width=\"479\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/331f7faf-89e9-468d-9887-9d58a2f66ff7\"\n/>\n\n-
passes the variables on the fields retrieval endpoint in the editor
to\nget the fields correctly when there are variables in the
query\n\n\n### Checklist\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"90a345b21a33ce90ffaa49306d61e3ceefb1a56d","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Feature:ES|QL","Team:ESQL","backport:version","v9.1.0","v8.19.0"],"title":"[ES|QL]
Follow ups on
variables","number":213040,"url":"https://github.com/elastic/kibana/pull/213040","mergeCommit":{"message":"[ES|QL]
Follow ups on variables (#213040)\n\n## Summary\n\nThis PR:\n\n- add an
extra information when hovering over a variable\n<img width=\"479\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/331f7faf-89e9-468d-9887-9d58a2f66ff7\"\n/>\n\n-
passes the variables on the fields retrieval endpoint in the editor
to\nget the fields correctly when there are variables in the
query\n\n\n### Checklist\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"90a345b21a33ce90ffaa49306d61e3ceefb1a56d"}},"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/213040","number":213040,"mergeCommit":{"message":"[ES|QL]
Follow ups on variables (#213040)\n\n## Summary\n\nThis PR:\n\n- add an
extra information when hovering over a variable\n<img width=\"479\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/331f7faf-89e9-468d-9887-9d58a2f66ff7\"\n/>\n\n-
passes the variables on the fields retrieval endpoint in the editor
to\nget the fields correctly when there are variables in the
query\n\n\n### Checklist\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"90a345b21a33ce90ffaa49306d61e3ceefb1a56d"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Mar 22, 2025
## Summary

This PR:

- add an extra information when hovering over a variable
<img width="479" alt="image"
src="https://github.com/user-attachments/assets/331f7faf-89e9-468d-9887-9d58a2f66ff7"
/>

- passes the variables on the fields retrieval endpoint in the editor to
get the fields correctly when there are variables in the query


### Checklist
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
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:ES|QL ES|QL related features in Kibana release_note:skip Skip the PR/issue when compiling release notes Team:ESQL ES|QL related features in Kibana t// v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants