fmannhardt opened a new issue, #30424:
URL: https://github.com/apache/superset/issues/30424

   ### Bug description
   
   When exporting any dashboard in 4.0.x, (tested with 4.0.2) the native filter 
configuration would be exported as:
   
   ```
   [..]
       name: Column desc
       filterType: filter_select
       targets:
       - column:
           name: column_name
         datasetUuid: 7ac464dc-315a-4c9e-b9ec-048d7bbcf382
   [..]
   ```
   
   When exporting any dashboard in Superset 4.1.0RC2 it is exported as:
   
   ```
       name: Column desc
       filterType: filter_select
       targets:
       - datasetId: 17
         column:
           name: column_name
   ```
   
   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:
   https://github.com/apache/superset/pull/26765
   and it moved the code responsible for rewriting `datasetId` to `datasetUuid` 
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
   
   - [X] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [X] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [X] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to