[Lens][Embeddable] Fix memory leak on ES|QL variables subscription#210826
Merged
dej611 merged 3 commits intoelastic:mainfrom Feb 14, 2025
Merged
[Lens][Embeddable] Fix memory leak on ES|QL variables subscription#210826dej611 merged 3 commits intoelastic:mainfrom
dej611 merged 3 commits intoelastic:mainfrom
Conversation
Contributor
|
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
Contributor
💚 Build Succeeded
Metrics [docs]Async chunks
History
cc @dej611 |
nickofthyme
approved these changes
Feb 13, 2025
Contributor
|
Starting backport for target branches: 8.16, 8.17, 8.18, 8.x https://github.com/elastic/kibana/actions/runs/13326167883 |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Feb 14, 2025
…lastic#210826) ## Summary This PR fixes a bug due to multiple subscription created by the ESQL variables logic in the embeddable to never been cancelled. The fix was to move the subscription in the loader module and make it cleanup correctly together with other subscription. Unit tests have been added to check the correct re-render behaviour. ### Checklist - [x] [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 (cherry picked from commit 34baecb)
Contributor
Contributor
|
Starting backport for target branches: 8.18 https://github.com/elastic/kibana/actions/runs/13326553682 |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Feb 14, 2025
…lastic#210826) ## Summary This PR fixes a bug due to multiple subscription created by the ESQL variables logic in the embeddable to never been cancelled. The fix was to move the subscription in the loader module and make it cleanup correctly together with other subscription. Unit tests have been added to check the correct re-render behaviour. ### Checklist - [x] [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 (cherry picked from commit 34baecb)
Contributor
💚 All backports created successfully
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
Feb 14, 2025
…ion (#210826) (#211171) # Backport This will backport the following commits from `main` to `8.x`: - [[Lens][Embeddable] Fix memory leak on ES|QL variables subscription (#210826)](#210826) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Marco Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-14T09:18:55Z","message":"[Lens][Embeddable] Fix memory leak on ES|QL variables subscription (#210826)\n\n## Summary\n\nThis PR fixes a bug due to multiple subscription created by the ESQL\nvariables logic in the embeddable to never been cancelled.\nThe fix was to move the subscription in the loader module and make it\ncleanup correctly together with other subscription.\n\nUnit tests have been added to check the correct re-render behaviour.\n\n\n### Checklist\n\n- [x] [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","sha":"34baecba3e11a14f5aaf3badc053056084945b33","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","Feature:Lens","backport:prev-major","v9.1.0"],"title":"[Lens][Embeddable] Fix memory leak on ES|QL variables subscription","number":210826,"url":"https://github.com/elastic/kibana/pull/210826","mergeCommit":{"message":"[Lens][Embeddable] Fix memory leak on ES|QL variables subscription (#210826)\n\n## Summary\n\nThis PR fixes a bug due to multiple subscription created by the ESQL\nvariables logic in the embeddable to never been cancelled.\nThe fix was to move the subscription in the loader module and make it\ncleanup correctly together with other subscription.\n\nUnit tests have been added to check the correct re-render behaviour.\n\n\n### Checklist\n\n- [x] [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","sha":"34baecba3e11a14f5aaf3badc053056084945b33"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210826","number":210826,"mergeCommit":{"message":"[Lens][Embeddable] Fix memory leak on ES|QL variables subscription (#210826)\n\n## Summary\n\nThis PR fixes a bug due to multiple subscription created by the ESQL\nvariables logic in the embeddable to never been cancelled.\nThe fix was to move the subscription in the loader module and make it\ncleanup correctly together with other subscription.\n\nUnit tests have been added to check the correct re-render behaviour.\n\n\n### Checklist\n\n- [x] [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","sha":"34baecba3e11a14f5aaf3badc053056084945b33"}}]}] BACKPORT--> Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
kibanamachine
added a commit
that referenced
this pull request
Feb 14, 2025
…tion (#210826) (#211170) # Backport This will backport the following commits from `main` to `8.18`: - [[Lens][Embeddable] Fix memory leak on ES|QL variables subscription (#210826)](#210826) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Marco Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-14T09:18:55Z","message":"[Lens][Embeddable] Fix memory leak on ES|QL variables subscription (#210826)\n\n## Summary\n\nThis PR fixes a bug due to multiple subscription created by the ESQL\nvariables logic in the embeddable to never been cancelled.\nThe fix was to move the subscription in the loader module and make it\ncleanup correctly together with other subscription.\n\nUnit tests have been added to check the correct re-render behaviour.\n\n\n### Checklist\n\n- [x] [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","sha":"34baecba3e11a14f5aaf3badc053056084945b33","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","Feature:Lens","backport:prev-major","v9.1.0"],"title":"[Lens][Embeddable] Fix memory leak on ES|QL variables subscription","number":210826,"url":"https://github.com/elastic/kibana/pull/210826","mergeCommit":{"message":"[Lens][Embeddable] Fix memory leak on ES|QL variables subscription (#210826)\n\n## Summary\n\nThis PR fixes a bug due to multiple subscription created by the ESQL\nvariables logic in the embeddable to never been cancelled.\nThe fix was to move the subscription in the loader module and make it\ncleanup correctly together with other subscription.\n\nUnit tests have been added to check the correct re-render behaviour.\n\n\n### Checklist\n\n- [x] [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","sha":"34baecba3e11a14f5aaf3badc053056084945b33"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210826","number":210826,"mergeCommit":{"message":"[Lens][Embeddable] Fix memory leak on ES|QL variables subscription (#210826)\n\n## Summary\n\nThis PR fixes a bug due to multiple subscription created by the ESQL\nvariables logic in the embeddable to never been cancelled.\nThe fix was to move the subscription in the loader module and make it\ncleanup correctly together with other subscription.\n\nUnit tests have been added to check the correct re-render behaviour.\n\n\n### Checklist\n\n- [x] [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","sha":"34baecba3e11a14f5aaf3badc053056084945b33"}}]}] BACKPORT--> Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
CAWilson94
pushed a commit
to CAWilson94/kibana
that referenced
this pull request
Mar 22, 2025
…lastic#210826) ## Summary This PR fixes a bug due to multiple subscription created by the ESQL variables logic in the embeddable to never been cancelled. The fix was to move the subscription in the loader module and make it cleanup correctly together with other subscription. Unit tests have been added to check the correct re-render behaviour. ### Checklist - [x] [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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes a bug due to multiple subscription created by the ESQL variables logic in the embeddable to never been cancelled.
The fix was to move the subscription in the loader module and make it cleanup correctly together with other subscription.
Unit tests have been added to check the correct re-render behaviour.
Checklist