betodealmeida opened a new pull request #11529:
URL: https://github.com/apache/incubator-superset/pull/11529


   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   
   Currently the import functionality in Superset is implemented in two 
different places:
   
   1. An `ImportExportMixin`, used by the CLI when importing datasources.
   2. Custom defined `import_obj` methods, used when importing dashboards (and 
associated objects) via CLI or web UI.
   
   Moving forward, to implement the import side of 
https://github.com/apache/incubator-superset/issues/11167 I'd like to:
   
   1. Remove the custom `import_obj` methods, and use only the mixin.
   2. Consolidate the current import logic in commands, so that we can keep 
importing the current format in the future.
   
   This PR consolidates the import logic for **dashboards** in a new command in 
the `superset.dashboards.commands.importers.v0` module. In the future I'll add 
a v1 version of the command for the format described in 
https://github.com/apache/incubator-superset/issues/11167, and logic to route 
between different version depending on the uploaded file.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   N/A
   
   ### TEST PLAN
   <!--- What steps should be taken to verify the changes -->
   
   Updated unit tests, and tested manually importing a dashboard via the web UI.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


----------------------------------------------------------------
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.

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