Open rdubois-kh opened 11 months ago
There's some discussion happening about using UUIDs for charts, which may impact this workflow a bit (cc @ville). Meanwhile, we'll try to get some attention on the PR... thanks for opening that (and the tests)!
Thanks @rusackas. We recently found some related issues with import of dashboards and charts in scope, at some other places of the JSON metadata. Please hold off in reviewing the PR. I'll adjust it with some additional fixes.
@rusackas the PR has been updated with a more complete/exhaustive fix. Thanks.
When a dashboard is imported using the
ImportDashboardsCommand
(v1), the charts id references are replaced from withing theposition_metadata
andjson_metadata
with the ids of the newly created charts in the target instance. During that process, it looks like some IDs have been missed in the native filters configuration. Indeed, thechartsInScope
references are never replaced with the newly created charts ids.How to reproduce the bug
uuid
of the chart with a new randomuuid
uuid
of the chart with a new randomuuid
, and by replacing theposition.CHART.meta.uuid
entry with the chart newuuid
generated in step 3 abovejson_metadata
native filterschartsInScope
is still made of the former chart IDExpected results
The imported dashboard
json_metadata
payloadchartsInScope
should be made of charts ID which compose this dashboard, in order thefiltersInScope
andfiltersOutScope
to be accuratelly computed.Actual results
The imported dashboard
json_metadata
payloadchartsInScope
is made of old charts ID which don't compose this new dashboard. It results in thefiltersInScope
andfiltersOutScope
to not be correct after import.Screenshots
Environment
(please complete the following information):
Checklist
Make sure to follow these steps before submitting your issue - thank you!
Additional context
Add any other context about the problem here.