Skip to content
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

chore: refactor upload data, less permissions and less endpoints #31958

Closed
wants to merge 2 commits into from

Conversation

dpgaspar
Copy link
Member

@dpgaspar dpgaspar commented Jan 22, 2025

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:

  • POST /api/v1/database/upload_metadata
  • POST /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

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Copy link

korbit-ai bot commented Jan 22, 2025

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 /korbit-review.

Your admin can change your review schedule in the Korbit Console

@github-actions github-actions bot added risk:db-migration PRs that require a DB migration api Related to the REST API labels Jan 22, 2025
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 95.34884% with 2 lines in your changes missing coverage. Please review.

Project coverage is 83.43%. Comparing base (76d897e) to head (6c7acb4).
Report is 1352 commits behind head on master.

Files with missing lines Patch % Lines
superset/databases/api.py 90.47% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #31958       +/-   ##
===========================================
+ Coverage   60.48%   83.43%   +22.94%     
===========================================
  Files        1931      546     -1385     
  Lines       76236    39227    -37009     
  Branches     8568        0     -8568     
===========================================
- Hits        46114    32728    -13386     
+ Misses      28017     6499    -21518     
+ Partials     2105        0     -2105     
Flag Coverage Δ
hive 48.78% <48.83%> (-0.39%) ⬇️
javascript ?
mysql 75.99% <48.83%> (?)
postgres 76.06% <48.83%> (?)
presto 53.28% <48.83%> (-0.52%) ⬇️
python 83.43% <95.34%> (+19.94%) ⬆️
sqlite 75.53% <48.83%> (?)
unit 61.02% <95.34%> (+3.40%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to the REST API risk:db-migration PRs that require a DB migration size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant