Skip to content

[Lens][ES|QL] Do not refetch the attributes if the query hasn't changed#195196

Merged
stratoula merged 6 commits intoelastic:mainfrom
stratoula:lens-esql-same-query-guard
Oct 9, 2024
Merged

[Lens][ES|QL] Do not refetch the attributes if the query hasn't changed#195196
stratoula merged 6 commits intoelastic:mainfrom
stratoula:lens-esql-same-query-guard

Conversation

@stratoula
Copy link
Copy Markdown
Contributor

@stratoula stratoula commented Oct 7, 2024

Summary

When a user is creating a Lens ES|QL chart we run the suggestions api even if the query hasn't changed. This PR adds a guard to avoid refetching the attributes when the query hasn't changed at all.

@kibana-ci
Copy link
Copy Markdown

💛 Build succeeded, but was flaky

Failed CI Steps

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
lens 1.5MB 1.5MB +36.0B

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@stratoula stratoula added Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// release_note:skip Skip the PR/issue when compiling release notes Feature:Lens backport:prev-minor Feature:ES|QL ES|QL related features in Kibana labels Oct 7, 2024
@stratoula stratoula marked this pull request as ready for review October 7, 2024 12:02
@stratoula stratoula requested a review from a team as a code owner October 7, 2024 12:02
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-visualizations (Team:Visualizations)

@stratoula stratoula enabled auto-merge (squash) October 9, 2024 14:13
@stratoula stratoula disabled auto-merge October 9, 2024 14:54
@stratoula stratoula enabled auto-merge (squash) October 9, 2024 14:55
@stratoula stratoula merged commit a209fe8 into elastic:main Oct 9, 2024
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.x

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

@elasticmachine
Copy link
Copy Markdown
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
lens 1.5MB 1.5MB +34.0B

History

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 9, 2024
…ed (elastic#195196)

## Summary

When a user is creating a Lens ES|QL chart we run the suggestions api
even if the query hasn't changed. This PR adds a guard to avoid
refetching the attributes when the query hasn't changed at all.

(cherry picked from commit a209fe8)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 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

kibanamachine added a commit that referenced this pull request Oct 9, 2024
…x27;t changed (#195196) (#195649)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Lens][ES|QL] Do not refetch the attributes if the query hasn't
changed (#195196)](#195196)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Stratoula
Kalafateli","email":"efstratia.kalafateli@elastic.co"},"sourceCommit":{"committedDate":"2024-10-09T16:46:31Z","message":"[Lens][ES|QL]
Do not refetch the attributes if the query hasn't changed
(#195196)\n\n## Summary\r\n\r\nWhen a user is creating a Lens ES|QL
chart we run the suggestions api\r\neven if the query hasn't changed.
This PR adds a guard to avoid\r\nrefetching the attributes when the
query hasn't changed at
all.","sha":"a209fe8d7d7d1e27bb9b80475ea2821a9202e823","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","Feature:Lens","v9.0.0","backport:prev-minor","Feature:ES|QL"],"title":"[Lens][ES|QL]
Do not refetch the attributes if the query hasn't
changed","number":195196,"url":"https://github.com/elastic/kibana/pull/195196","mergeCommit":{"message":"[Lens][ES|QL]
Do not refetch the attributes if the query hasn't changed
(#195196)\n\n## Summary\r\n\r\nWhen a user is creating a Lens ES|QL
chart we run the suggestions api\r\neven if the query hasn't changed.
This PR adds a guard to avoid\r\nrefetching the attributes when the
query hasn't changed at
all.","sha":"a209fe8d7d7d1e27bb9b80475ea2821a9202e823"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195196","number":195196,"mergeCommit":{"message":"[Lens][ES|QL]
Do not refetch the attributes if the query hasn't changed
(#195196)\n\n## Summary\r\n\r\nWhen a user is creating a Lens ES|QL
chart we run the suggestions api\r\neven if the query hasn't changed.
This PR adds a guard to avoid\r\nrefetching the attributes when the
query hasn't changed at
all.","sha":"a209fe8d7d7d1e27bb9b80475ea2821a9202e823"}}]}] BACKPORT-->

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:ES|QL ES|QL related features in Kibana Feature:Lens release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v8.16.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants