Skip to content

Editing a saved object from Management UI can corrupt the saved object #66542

@markov00

Description

@markov00

Kibana version:
7.8 BC2

Describe the bug:
When editing and saving a dashboard from the Management UI, the saved object lose all its references to each embeddable, causing two main issues:

  • the Dashboard no longer renders
  • the saved object is now corrupted

Steps to reproduce:

  1. add the Sample web log sample dataset
  2. open the [Logs] Web Traffic dashboard: it should render correctly
  3. now open the Stack Monitoring UI -> Saved object and Inspect the [Logs] Web Traffic saved object.
  4. note that the last field of the form, references always shows an empty array also if, inspecting the network or the real object saved into kibana, the references array has all the references to the used embeddable in the dashboard.

Screenshot 2020-05-14 at 12 17 28

  1. now edit one color on the dashboard panelJSON or simply click save
  2. return to the Dashboard and see that you can no longer see the visualizations and an error appear

Expected behavior:
The Saved Object UI should show and save all the references correctly.

Screenshots (if relevant):
Screenshot 2020-05-14 at 11 37 58

Errors in browser console (if relevant):
none

Provide logs and/or server output (if relevant):
no relevant logs

Any additional context:

I’ve investigated a bit more and I’ve found that this PR is probably the root cause: #61700

Seems that there is an issue when converting the saved object to the field list to be rendered on the saved object UI.
This can be located in src/plugins/saved_objects_management/public/lib/create_field_list.ts and consequentially in src/plugins/saved_objects_management/public/management_section/object_view/components/form.tsx
Seems that we are trying to get the references array from the attributes property of the SimpleSavedObject but they live on the root level of the same object.

Metadata

Metadata

Assignees

Labels

Feature:Kibana ManagementFeature label for Data Views, Advanced Setting, Saved Object management pagesFeature:Saved ObjectsTeam:CorePlatform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t//blockerbugFixes for quality problems that affect the customer experienceregressionv7.8.0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions