-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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: actually write changes on "superset import-datasources" #14817
Conversation
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue |
Auto-closing a PR without a single comment or feedback from project maintainers in a year? Come on, that's not very nice. Is it because the importer migrated to v1? As far as I know, the issue that this PR resolves is still present in importer v0. |
I see this PR is still open (despite StaleBot's empty threats). Obviously, this has been sitting around for a long while, which I also apologize for... please advise on whether or not this is still important to merge, and maybe we can finally get it that review. |
e19a8e9
to
1cd278a
Compare
Thanks for the response @rusackas. At the time, the PR did seem important. I'm not so sure that it is still important, but I'm pretty sure that the bug is still there. So I would suggest to merge this PR. |
When running the following command: superset import-datasources --path=datasource.json the data stored in "datasources.json" may either be dict or a list. In the case of a dataset exported from a live superset instance, it is a list. When it is re-imported, the `SqlaTable.import_from_dict` utility method is used. This method does not commit changes to the database, so the imported datasets are never saved to the database, causing frustration and sadness.
fdc4b8c
to
2e1e0f6
Compare
Rebased on top of master. I'm still hoping this will be merged in 2024 😛 |
Running CI 🤞 Here's hoping it'll turn green :D |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #14817 +/- ##
===========================================
+ Coverage 60.48% 83.75% +23.26%
===========================================
Files 1931 518 -1413
Lines 76236 37624 -38612
Branches 8568 0 -8568
===========================================
- Hits 46114 31512 -14602
+ Misses 28017 6112 -21905
+ Partials 2105 0 -2105
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Unfortunately I no longer have time to setup a dev environment for Superset, and thus I am unable to add unit tests to this PR. |
Thanks for merging this PR! |
Thanks for the PR! Sorry it took approximately forever. We won't the next one slip through the cracks, I promise ;) |
SUMMARY
When running the following command:
the data stored in "datasources.json" may either be dict or a list. In the case
of a dataset exported from a live superset instance, it is a list. When it is
re-imported, the
SqlaTable.import_from_dict
utility method is used. Thismethod does not commit changes to the database, so the imported datasets are
never saved to the database, causing frustration and sadness.
TESTING INSTRUCTIONS
Prior to the fix, the new dataset is not created.
ADDITIONAL INFORMATION