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][ES|QL] Do not refetch the attributes if the query hasn't changed #195196

Merged
merged 6 commits into from
Oct 9, 2024

Conversation

stratoula
Copy link
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
Collaborator

💛 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 Visualization editors, elastic-charts and infrastructure release_note:skip Skip the PR/issue when compiling release notes Feature:Lens backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) 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
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
25 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

@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
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
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":"[email protected]"},"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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Feature:ES|QL ES|QL related features in Kibana Feature:Lens release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants