elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.78k stars 8.19k forks source link

[Exploratory view] Static data views are not shared across spaces #142851

Open emilioalvap opened 2 years ago

emilioalvap commented 2 years ago

Kibana version: main

Original install method (e.g. download page, yum, from source, etc.): source

Describe the bug:

ExploratoryViewEmbeddable uses static data views defined at x-pack/plugins/observability/public/utils/observability_data_views/observability_data_views.ts. These are created upon the first navigation on the default space.

When user tries to load exploratory view or UX dashboard on a space other than default, data view cannot be retrieved, created or updated through savedObjects client. The first request will fail, but the object will be cached in the browser nonetheless, so the error can only be reproduced once after loading:

Steps to reproduce:

  1. Create a custom space and activate it.
  2. Navigate to UX.
  3. Click on top right menu, Explore data.
  4. Depending on how fast the action is performed, it might be able to load data. If it does, refresh the page.
  5. Notice data view cannot be loaded.

image image

Expected behavior:

ExploratoryViewEmbeddable should be able to load data views regardless of the space. @shahzad31 has suggested migrating from static views to adhoc data views, now supported by lens: https://github.com/elastic/kibana/pull/138732

elasticmachine commented 2 years ago

Pinging @elastic/unified-observability (Team:Unified observability)