kibana/x-pack/plugins
Vadim Yakhin a7fd3deb73
[Workplace Search] Fix early sources logic unmounting (#113023)
* Fix error appearing if user leaves Sources page very quickly

The issue was that the response from /sources endpoint could came after the user has left the page.
Since the user has already left the page, the Sources logic is unmounted,
and any code that was using the response couldn't update the value in that logic file and caused an error.

Fortunately Kea provides a `breakpoint` API exactly for such cases:
https://kea.js.org/docs/guide/additional#breakpoints

This commit uses that API to fix the issue.

* Fix error appearing after leaving Sources page less quickly

This commit solves the same problem, but for the /status endpoint:
1) for the first status call that saves server values to the sources_logic
2) for the subsequent status calls that poll the server for the status updates

* Increase test coverage

The new test duplicates the test below it, but it doesn't set up
initial source statuses. For some reason this case was considered to be covered before,
but after seemingly unrelated changes in this PR, the coverage started to show that this
code branch was missed.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-30 20:48:18 +01:00
..
actions
alerting [Alerting] Remove unnecessary call on every kibana load (#116572) 2021-10-29 19:48:25 +02:00
apm [ML] Fix y axis ticks. (#116670) 2021-10-30 14:51:55 +00:00
banners
canvas remove all references to v7 theme (#113570) 2021-10-29 12:28:42 -05:00
cases [105264] Fix error not surfacing bug for Jira (#114800) 2021-10-29 13:27:41 -05:00
cloud
cross_cluster_replication
dashboard_enhanced
data_enhanced
data_visualizer
discover_enhanced
drilldowns
embeddable_enhanced
encrypted_saved_objects
enterprise_search [Workplace Search] Fix early sources logic unmounting (#113023) 2021-10-30 20:48:18 +01:00
event_log Updates Github link references from master to main (#116789) 2021-10-29 09:53:08 -07:00
features
file_upload chore(NA): bump version to 8.1.0 (#116429) 2021-10-27 21:24:48 +01:00
fleet [Fleet] Fix pipeline with id [*] does not exists (#116707) 2021-10-29 13:44:24 -04:00
global_search
global_search_bar [Global search] Prevent unnecessary /internal/global_search/find http call at startup (#112535) 2021-10-28 15:26:28 +02:00
global_search_providers
graph chore(NA): bump version to 8.1.0 (#116429) 2021-10-27 21:24:48 +01:00
grokdebugger chore(NA): bump version to 8.1.0 (#116429) 2021-10-27 21:24:48 +01:00
index_lifecycle_management [ILM] Fixed skipped a11y and functional tests (#116207) 2021-10-28 12:54:09 +01:00
index_management chore(NA): bump version to 8.1.0 (#116429) 2021-10-27 21:24:48 +01:00
infra Revert "[Metrics UI] Fix OR logic on redundant groupBy detection (#116695)" (#116820) 2021-10-29 16:48:15 -04:00
ingest_pipelines Updates Github link references from master to main (#116789) 2021-10-29 09:53:08 -07:00
lens remove all references to v7 theme (#113570) 2021-10-29 12:28:42 -05:00
license_api_guard
license_management
licensing
lists
logstash
maps [Maps] fix data-mapping switch enabled for vector tiles (#116366) 2021-10-29 12:47:58 -06:00
metrics_entities
ml [ML] Data Frame Analytics Wizard: ensure includes updated correctly on dependent variable change (#116381) 2021-10-29 13:48:42 -04:00
monitoring [Stack Monitoring] Logstash Functional Tests (#116481) 2021-10-29 13:55:32 -04:00
observability Fix intermitting series state (#115747) 2021-10-29 19:50:14 +02:00
osquery Updates Github link references from master to main (#116789) 2021-10-29 09:53:08 -07:00
painless_lab [Dev Tools] Design fixes for theme v8 (#116236) 2021-10-30 09:34:22 +00:00
remote_clusters chore(NA): bump version to 8.1.0 (#116429) 2021-10-27 21:24:48 +01:00
reporting [Reporting] Remove Boom (#116289) 2021-10-28 14:18:22 +01:00
rollup
rule_registry [Security Solution] Security RAC migration follow up bug fixes (#116386) 2021-10-28 10:21:51 -04:00
runtime_fields
saved_objects_tagging
searchprofiler [Dev Tools] Design fixes for theme v8 (#116236) 2021-10-30 09:34:22 +00:00
security remove all references to v7 theme (#113570) 2021-10-29 12:28:42 -05:00
security_solution Follow up (#116860) 2021-10-29 23:39:36 -06:00
snapshot_restore
spaces [SECURITY] Copy saved object flyout should not allow copying into the active space (#116657) 2021-10-29 13:55:17 -04:00
stack_alerts chore(NA): bump version to 8.1.0 (#116429) 2021-10-27 21:24:48 +01:00
task_manager chore(NA): bump version to 8.1.0 (#116429) 2021-10-27 21:24:48 +01:00
telemetry_collection_xpack Updates Github link references from master to main (#116789) 2021-10-29 09:53:08 -07:00
timelines
transform [ML] Fix Transforms not retaining _meta on clone (#116206) 2021-10-28 12:24:52 +01:00
translations [Security Solutions] Critical bug fix to make error messages about missing connections clearer for the end user. (#116490) 2021-10-29 11:44:38 -06:00
triggers_actions_ui [105264] Fix error not surfacing bug for Jira (#114800) 2021-10-29 13:27:41 -05:00
ui_actions_enhanced
upgrade_assistant
uptime [Uptime] Fix filters in query for fetching monitor attached rules (#115921) 2021-10-29 19:50:47 +02:00
watcher