-
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
refactor: upload data unification, less permissions and less endpoints #31959
Conversation
Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #31959 +/- ##
===========================================
+ Coverage 60.48% 83.32% +22.83%
===========================================
Files 1931 544 -1387
Lines 76236 38916 -37320
Branches 8568 0 -8568
===========================================
- Hits 46114 32425 -13689
+ Misses 28017 6491 -21526
+ 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. |
Korbit doesn't automatically review large (500+ lines changed) pull requests such as this one. If you want me to review anyway, use |
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.
Did a fairly thorough review, paying special attention to the db migration and LGTM!
@dpgaspar I know that we haven't put up the SIP yet (still on my todo list) but I think we should consider api semver as a separate thing from application semver. In other words, we should only remove api endpoints when the entire v1 api is deprecated and removed. |
…-upload-can-columnar-upload-in-favour-of-just-can-upload-on-database
Sounds very good for the future. We have been applying semver at the application level only, and taking the opportunity to replace APIs and change specs. This change was approved here: https://github.com/orgs/apache/projects/345?pane=issue&itemId=61955191&issue=apache%7Csuperset%7C28352. Alternatively I can add the endpoints back in (and permissions) and add the deprecated decorator for 6.0? |
@dpgaspar and I talked about the impact of this change, and it's not a commonly-used endpoint, so we'll go with the current flow which is that breaking api changes are permissible during an application breaking change release, and I'll plan on putting up a SIP soon so that we can discuss a new policy for having a separate semver for the api. |
SUMMARY
This pull request unifies csv, excel and columnar upload endpoints and permissions into a single endpoint and permission type.
This is a breaking change related with Apache Superset 5.0
Removes the following endpoints:
POST
/api/v1/database/csv_metadata
POST
/api/v1/database/excel_metadata
POST
/api/v1/database/columnar_metadata
POST
/api/v1/database/<id>/csv_upload
POST
/api/v1/database/<id>/excel_upload
POST
/api/v1/database/<id>/columnar_upload
And adds the following generic endpoints:
/api/v1/database/upload_metadata
/api/v1/database/<id>/upload
Removes the following permissions:
can csv upload on Database
can excel upload on Database
can columnar upload on Database
And adds the following permission:
can upload on Database
Includes a db migration that should run fast, depending on the number of roles that include the
can <file-type> upload on Database
permission.Upgrade and downgrade were tested, but be aware that we loose granularity when downgrading, since we are converging 3 permissions into 1, the downgrade will always expand the final permission into 3 permissions.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION