-
Notifications
You must be signed in to change notification settings - Fork 14k
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
feat(api): database schemas migration to new API #10436
Conversation
@@ -252,6 +252,24 @@ def test_schemas(self): | |||
response = json.loads(rv.data.decode("utf-8")) | |||
self.assertEqual(0, len(response["result"])) | |||
|
|||
def test_database_schemas(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.
suggestion: there are some complexity due to the api pagination, it may be useful to test it as well
e.g. @nytai helped me to figure out that dropbox/incubator-superset-internal@a7aec30 setting max_page_size = -1 and page_size = -1 breaks some assumptions about pagination apis & it's not covered by unit tests.
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.
This endpoint has no pagination, since if I'm not mistaken the dropdown does not support it yet
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.
We can convert the dropdown to use pagination if we think it would be useful. Currently, it only makes one api call to retrieve the list of options.
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.
It would be super useful on the SQLLab database dropdown
Codecov Report
@@ Coverage Diff @@
## master #10436 +/- ##
==========================================
- Coverage 70.25% 64.03% -6.23%
==========================================
Files 605 544 -61
Lines 32377 30612 -1765
Branches 3271 2885 -386
==========================================
- Hits 22745 19601 -3144
- Misses 9522 10830 +1308
- Partials 110 181 +71
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.
LGTM. I tried hard to come up with a single nit, but came up short. 🙂 Good work! 🎉
Thank you! @villebro |
* fix(log): log crashes if expired or not authenticated * fix lint and rison * add tests * more tests * perm fix * fix test not found * JS lint * fix Jest test
SUMMARY
This PR deprecates the old API endpoint
/superset/schemas/<db_id>
and migrates it to a new endpoint on/api/v1/database/<id>/schemas/
Also fixes:
ADDITIONAL INFORMATION