-
Notifications
You must be signed in to change notification settings - Fork 13.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(cli): add impersonate_user to db import #29522
Conversation
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.
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.
Makes me wonder whether other fields may get lost while doing export/import round trips.
3281f25
to
19fc3da
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #29522 +/- ##
===========================================
+ Coverage 60.48% 83.70% +23.21%
===========================================
Files 1931 527 -1404
Lines 76236 38053 -38183
Branches 8568 0 -8568
===========================================
- Hits 46114 31851 -14263
+ Misses 28017 6202 -21815
+ 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. |
superset/models/core.py
Outdated
@@ -171,6 +171,7 @@ class Database(Model, AuditMixinNullable, ImportExportMixin): # pylint: disable | |||
"allow_dml", | |||
"allow_file_upload", | |||
"extra", | |||
"impersonate_user" |
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.
"impersonate_user" | |
"impersonate_user", |
Can we add a unit test with the new param? Here's an example in
|
19fc3da
to
b7aa291
Compare
Approving CI. Ping me if it passes and needs a merge! |
@rusackas This error looks unrelated to my changes.
|
tests/unit_tests/databases/commands/importers/v1/import_test.py
Outdated
Show resolved
Hide resolved
Running CI. 🤞 Ping me if it turns green :D |
@rusackas it's green! |
Thanks @chessman! |
SUMMARY
When importing a directory using
superset import-directory
command, it should respect theimpersonate_user
flag specified in the database yaml definition.TESTING INSTRUCTIONS
Import a database that supports this flag and verify that this flag is enabled.
ADDITIONAL INFORMATION