Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lens esql generation #196049

Merged
merged 117 commits into from
Feb 3, 2025
Merged

lens esql generation #196049

merged 117 commits into from
Feb 3, 2025

Conversation

ppisljar
Copy link
Member

@ppisljar ppisljar commented Oct 14, 2024

Summary

updates lens so it uses ESQL when requesting data from elasticsearch rather than DSL when that is possible.

nothing should change for the user, everything should work exactly as before

but when going to inspector you will be able to see that in some cases we will send out ESQL request.

the feature is only enabled when the lens.enable_esql feature flag is enabled.

at the moment this covers very few cases, but rather builds the necessary infrastructure so we can keep improving this over time:

  • user has to be in UTC timezone
  • user needs to use set of lens operations that are supported

how to test:

  1. put this in your kibana.dev.yaml:
feature_flags.overrides:
  lens.enable_esql: true
  1. go to advanced settings and set timezone to UTC
  2. go to lens, configure a chart (for example a metric chart showing average of products.price
  3. go to inspector -> requests and you can see that we sent out ESQL query
  4. visually nothing should change

todo:

  • make sure CI is green when the feature flag is enabled

@ppisljar ppisljar added Team:Visualizations Visualization editors, elastic-charts and infrastructure release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting labels Nov 12, 2024
Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

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

This looks great Peter, LGTM!

@ppisljar ppisljar added backport:8.17 and removed backport:skip This commit does not require backporting labels Jan 29, 2025
@afharo
Copy link
Member

afharo commented Jan 29, 2025

Is this the first use of the Feature Flags service? Nice! 🙌

afharo
afharo previously requested changes Jan 29, 2025
Comment on lines 185 to 186
feature_flags.overrides:
lens.enable_esql: true
Copy link
Member

Choose a reason for hiding this comment

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

Please, remember to remove this before merging

Copy link
Member Author

Choose a reason for hiding this comment

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

this was just added in the commit named revert before merging to check once again that CI is passing when this flag is on

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for confirming! I'm sure that Core won't be needed when this is removed :)

@afharo afharo dismissed their stale review January 29, 2025 12:11

Core review won't be needed when the changes to kibana.yml are removed

@ppisljar
Copy link
Member Author

ppisljar commented Jan 29, 2025

as expected rollup and search sessions tests fail when turning the flag on, everything else passes

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
data 608 623 +15
lens 1810 1811 +1
total +16

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
data 2598 2600 +2
expressions 1772 1774 +2
total +4

Async chunks

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

id before after diff
dashboard 601.9KB 601.9KB +13.0B
dataVisualizer 720.0KB 720.0KB +13.0B
esql 229.7KB 229.7KB +13.0B
lens 1.6MB 1.6MB +6.7KB
maps 3.0MB 3.0MB +13.0B
securitySolution 21.4MB 21.4MB +13.0B
total +6.7KB

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
data 25 26 +1

Page load bundle

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

id before after diff
data 420.2KB 423.6KB +3.3KB
expressions 101.4KB 101.7KB +302.0B
total +3.6KB
Unknown metric groups

API count

id before after diff
data 3213 3215 +2
expressions 2244 2246 +2
total +4

History

@ppisljar ppisljar merged commit 762fd8c into elastic:main Feb 3, 2025
10 checks passed
@kibanamachine kibanamachine added v9.1.0 backport missing Added to PRs automatically when the are determined to be missing a backport. labels Feb 3, 2025
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 196049 locally

1 similar comment
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 196049 locally

@kibanamachine kibanamachine added backport:skip This commit does not require backporting and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Feb 5, 2025
@ppisljar
Copy link
Member Author

ppisljar commented Feb 5, 2025

💚 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants