Dashboard export does not export datasetUuid
in native filter targets but datasetId
in 4.1
#30424
Closed
3 tasks done
Labels
dashboard:export
Related to exporting dashboards
Bug description
When exporting any dashboard in 4.0.x, (tested with 4.0.2) the native filter configuration would be exported as:
When exporting any dashboard in Superset 4.1.0RC2 it is exported as:
This works fine when exporting and just importing to the same instance of an empty Superset but leads to a corruption of the filter settings when datasets are already existing since the wrong dataset (based on
datasetId
) will used for a filter.I did some research and the main (only relevant) change introduced is:
#26765
and it moved the code responsible for rewriting
datasetId
todatasetUuid
away from the code that actually generates the content and in a path that is only responsible to find connected objects:https://github.com/apache/superset/blame/2e4f6d3f38404b70f8d0324743c229a4917acaed/superset/commands/dashboard/export.py#L182-L194
I think this would need to be reintroduced in the
_file_content
method. I already prepared a patch internally and testing it now. If it works, I will try to provide a PR as soon as possible since this is a blocker for me to use 4.1.0RC2.Note that there is already some duplication of code by separating generating the content from exporting the related objects. So, maybe this should be done differently than simply duplicating more code.
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
Not applicable
Node version
Not applicable
Browser
Not applicable
Additional context
Tested on 4.1.0RC2
Checklist
The text was updated successfully, but these errors were encountered: