-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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: change database save in DatasourceEditor #9255
Conversation
This addresses the issue where pointing a datasource to another database in the datasource editor is not reflected. Also addresses: - a minorcosmetic issue in the datasource editor. - user/owners list not getting populated
ba0a93b
to
696ce3c
Compare
696ce3c
to
c125195
Compare
Codecov Report
@@ Coverage Diff @@
## master #9255 +/- ##
=======================================
Coverage 58.92% 58.92%
=======================================
Files 373 373
Lines 12016 12016
Branches 2948 2948
=======================================
Hits 7081 7081
Misses 4756 4756
Partials 179 179
Continue to review full report at Codecov.
|
@@ -745,6 +745,7 @@ def import_dashboards(self): | |||
try: | |||
dashboard_import_export.import_dashboards(db.session, f.stream) | |||
except DatabaseNotFound as e: | |||
logger.exception(e) |
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.
👍
@@ -268,7 +268,7 @@ def create_fake_db(self): | |||
cls=models.Database, | |||
criteria={"database_name": database_name}, | |||
session=db.session, | |||
sqlalchemy_uri="sqlite://test", | |||
sqlalchemy_uri="sqlite:///:memory:", |
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.
👍
@@ -18,6 +18,7 @@ | |||
datasource_post = { | |||
"id": None, | |||
"column_formats": {"ratio": ".2%"}, | |||
"database": {"id": 1}, |
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.
Eventually it would be good to move these to randomly generated IDs (note to self)
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.
Yes, actually here I replace it in the test itself. Not sure what the proper approach here, a function that receives an object and returns a fixture? I'm guessing with DAO abstraction we can get more creative on generating proper fixtures.
This addresses the issue where pointing a datasource to another database
in the datasource editor is not reflected.
Also addresses:
CATEGORY
Choose one