[Discover] Should be able to complete all quickly opened tabs#246941
[Discover] Should be able to complete all quickly opened tabs#246941jughosta merged 5 commits intoelastic:mainfrom
Conversation
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#10164[✅] src/platform/test/functional/apps/discover/tabs/config.ts: 25/25 tests passed. |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
cc @jughosta |
|
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
davismcphee
left a comment
There was a problem hiding this comment.
Thanks for fixing it!
| if (numberOfFetches > 0) { | ||
| subscription.unsubscribe(); | ||
| } else { | ||
| // to let the initial fetch to execute properly before unsubscribing | ||
| setTimeout(() => subscription.unsubscribe(), 200); | ||
| } |
There was a problem hiding this comment.
I think ideally we'd extract the fetch$ subscription callback to a separate function and call it directly on init to avoid the debounce vs relying on a timeout. But that's also a higher impact change for something backported, so this is good for now. Still think it's worth doing at some point though.
|
Starting backport for target branches: 9.2, 9.3 |
…c#246941) - Closes elastic#246406 ## Summary Unsubscribe was triggered too fast and it did not allow the initial fetch to even start to execute. This PR delays the unsubscribe and lets to fetch the data for the tab. ### 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 - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. (cherry picked from commit 3acd431)
…c#246941) - Closes elastic#246406 ## Summary Unsubscribe was triggered too fast and it did not allow the initial fetch to even start to execute. This PR delays the unsubscribe and lets to fetch the data for the tab. ### 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 - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. (cherry picked from commit 3acd431)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…246941) (#247910) # Backport This will backport the following commits from `main` to `9.3`: - [[Discover] Should be able to complete all quickly opened tabs (#246941)](#246941) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Julia Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2026-01-06T08:34:19Z","message":"[Discover] Should be able to complete all quickly opened tabs (#246941)\n\n- Closes https://github.com/elastic/kibana/issues/246406\n\n## Summary\n\nUnsubscribe was triggered too fast and it did not allow the initial\nfetch to even start to execute. This PR delays the unsubscribe and lets\nto fetch the data for the tab.\n\n\n### Checklist\n\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\n- [x] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"3acd4319f0be59d23d0302dadfab218397f5d10e","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:DataDiscovery","Project:OneDiscover","backport:version","v9.3.0","Feature:DiscoverTabs","v9.4.0","v9.2.4"],"title":"[Discover] Should be able to complete all quickly opened tabs","number":246941,"url":"https://github.com/elastic/kibana/pull/246941","mergeCommit":{"message":"[Discover] Should be able to complete all quickly opened tabs (#246941)\n\n- Closes https://github.com/elastic/kibana/issues/246406\n\n## Summary\n\nUnsubscribe was triggered too fast and it did not allow the initial\nfetch to even start to execute. This PR delays the unsubscribe and lets\nto fetch the data for the tab.\n\n\n### Checklist\n\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\n- [x] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"3acd4319f0be59d23d0302dadfab218397f5d10e"}},"sourceBranch":"main","suggestedTargetBranches":["9.3","9.2"],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/246941","number":246941,"mergeCommit":{"message":"[Discover] Should be able to complete all quickly opened tabs (#246941)\n\n- Closes https://github.com/elastic/kibana/issues/246406\n\n## Summary\n\nUnsubscribe was triggered too fast and it did not allow the initial\nfetch to even start to execute. This PR delays the unsubscribe and lets\nto fetch the data for the tab.\n\n\n### Checklist\n\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\n- [x] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"3acd4319f0be59d23d0302dadfab218397f5d10e"}},{"branch":"9.2","label":"v9.2.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
…246941) (#247909) # Backport This will backport the following commits from `main` to `9.2`: - [[Discover] Should be able to complete all quickly opened tabs (#246941)](#246941) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Julia Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2026-01-06T08:34:19Z","message":"[Discover] Should be able to complete all quickly opened tabs (#246941)\n\n- Closes https://github.com/elastic/kibana/issues/246406\n\n## Summary\n\nUnsubscribe was triggered too fast and it did not allow the initial\nfetch to even start to execute. This PR delays the unsubscribe and lets\nto fetch the data for the tab.\n\n\n### Checklist\n\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\n- [x] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"3acd4319f0be59d23d0302dadfab218397f5d10e","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:DataDiscovery","Project:OneDiscover","backport:version","v9.3.0","Feature:DiscoverTabs","v9.4.0","v9.2.4"],"title":"[Discover] Should be able to complete all quickly opened tabs","number":246941,"url":"https://github.com/elastic/kibana/pull/246941","mergeCommit":{"message":"[Discover] Should be able to complete all quickly opened tabs (#246941)\n\n- Closes https://github.com/elastic/kibana/issues/246406\n\n## Summary\n\nUnsubscribe was triggered too fast and it did not allow the initial\nfetch to even start to execute. This PR delays the unsubscribe and lets\nto fetch the data for the tab.\n\n\n### Checklist\n\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\n- [x] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"3acd4319f0be59d23d0302dadfab218397f5d10e"}},"sourceBranch":"main","suggestedTargetBranches":["9.3","9.2"],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/246941","number":246941,"mergeCommit":{"message":"[Discover] Should be able to complete all quickly opened tabs (#246941)\n\n- Closes https://github.com/elastic/kibana/issues/246406\n\n## Summary\n\nUnsubscribe was triggered too fast and it did not allow the initial\nfetch to even start to execute. This PR delays the unsubscribe and lets\nto fetch the data for the tab.\n\n\n### Checklist\n\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\n- [x] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"3acd4319f0be59d23d0302dadfab218397f5d10e"}},{"branch":"9.2","label":"v9.2.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
…c#246941) - Closes elastic#246406 ## Summary Unsubscribe was triggered too fast and it did not allow the initial fetch to even start to execute. This PR delays the unsubscribe and lets to fetch the data for the tab. ### 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 - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.
…c#246941) - Closes elastic#246406 ## Summary Unsubscribe was triggered too fast and it did not allow the initial fetch to even start to execute. This PR delays the unsubscribe and lets to fetch the data for the tab. ### 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 - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.
…c#246941) - Closes elastic#246406 ## Summary Unsubscribe was triggered too fast and it did not allow the initial fetch to even start to execute. This PR delays the unsubscribe and lets to fetch the data for the tab. ### 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 - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.
Summary
Unsubscribe was triggered too fast and it did not allow the initial fetch to even start to execute. This PR delays the unsubscribe and lets to fetch the data for the tab.
Checklist
release_note:*label is applied per the guidelinesbackport:*labels.