-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: new import/export CLI #13921
fix: new import/export CLI #13921
Conversation
77f8fcf
to
0012202
Compare
Codecov Report
@@ Coverage Diff @@
## master #13921 +/- ##
==========================================
+ Coverage 77.83% 77.87% +0.04%
==========================================
Files 934 939 +5
Lines 47320 47774 +454
Branches 5913 5913
==========================================
+ Hits 36831 37206 +375
- Misses 10346 10425 +79
Partials 143 143
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yey!
* fix: CLI for import/export * Add tests * Remove debug
SUMMARY
The new CLI for import/export is not working correctly with ZIP files (see #13914). When exporting a dataset or dashboard, the default output file name is
dashboard_export_YYYYMMDDTHHMMSS
(sic), while it should (1) have the.zip
extension and (2) have an actual timestamp instead of the string "YYYYMMDDTHHMMSS".Import is also broken for the new format, even with the
VERSIONED_EXPORT
feature flag on it assumes that the input file is the old YAML/JSON format used for datasets and dashboards, respectively. I fixed it by using the same logic as the API, inspecting the file to see if a ZIP file and unbundling it if that's the case.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
TEST PLAN
superset export-dashboards
superset import-dashboards -p dashboard_export_20210401T132948.zip
Did the same with datasets (exported datasets; deleted all dashboards, charts, datasets; imported datasets).
Also added unit tests covering import/export with the feature flag on and off.
ADDITIONAL INFORMATION