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: remove deprecated apis estimate_query_cost, results, sql_json, csv #24359

Merged
merged 6 commits into from
Jun 13, 2023

Conversation

dpgaspar
Copy link
Member

SUMMARY

Removes old deprecated APIs:

  • /superset/estimate_query_cost/...
  • /superset/results/...
  • /superset/sql_json/...
  • /superset/csv/...

Effort on removing deprecated APIs from /superset: #24332

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

@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Merging #24359 (982d41b) into master (cd78ccb) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

❗ Current head 982d41b differs from pull request most recent head 1a09580. Consider uploading reports for the commit 1a09580 to get more accurate results

@@            Coverage Diff             @@
##           master   #24359      +/-   ##
==========================================
- Coverage   69.05%   69.03%   -0.02%     
==========================================
  Files        1903     1903              
  Lines       74537    74384     -153     
  Branches     8108     8108              
==========================================
- Hits        51468    51350     -118     
+ Misses      20957    20922      -35     
  Partials     2112     2112              
Flag Coverage Δ
hive 53.85% <100.00%> (+0.05%) ⬆️
javascript 55.61% <ø> (ø)
mysql 79.33% <100.00%> (+<0.01%) ⬆️
postgres 79.41% <100.00%> (+<0.01%) ⬆️
presto 53.78% <100.00%> (+0.05%) ⬆️
python 83.35% <100.00%> (+0.02%) ⬆️
sqlite 77.92% <100.00%> (+<0.01%) ⬆️
unit 54.27% <66.66%> (+0.05%) ⬆️

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

Impacted Files Coverage Δ
...erset-frontend/src/profile/components/fixtures.tsx 100.00% <ø> (ø)
superset/security/manager.py 93.83% <100.00%> (+<0.01%) ⬆️
superset/views/core.py 76.70% <100.00%> (+1.30%) ⬆️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@dpgaspar dpgaspar requested review from geido and villebro June 12, 2023 22:14
@@ -713,6 +712,7 @@ def create_custom_permissions(self) -> None:
self.add_permission_view_menu("all_datasource_access", "all_datasource_access")
self.add_permission_view_menu("all_database_access", "all_database_access")
self.add_permission_view_menu("all_query_access", "all_query_access")
self.add_permission_view_menu("can_csv", "Superset")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to be a custom permissions now. I think that something like can_download_chart would make more sense, so I propose we do that as a fast follow.

Another alternative is to totally remove this permission, since a user that can download a CSV, XLS related with a chart already as access to that chart data.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this new perm combine both CSV/XLSX etc downloading, and chart/dashboard image downloading? I think that could make sense.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no strong opinions about it, I'll propose it

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with a minor comment about the removed perm in the frontend test fixture.

@@ -29,7 +29,6 @@ export const user: UserWithPermissionsAndRoles = {
],
sql_lab: [
['menu_access', 'SQL Lab'],
['can_sql_json', 'Superset'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, don't we need to add the new API perms to these fixtures? Maybe they're not covered by the current tests, so maybe we can add them later when they're needed..

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, don't think their covered, sqllab FE code needs to be revisited

@@ -713,6 +712,7 @@ def create_custom_permissions(self) -> None:
self.add_permission_view_menu("all_datasource_access", "all_datasource_access")
self.add_permission_view_menu("all_database_access", "all_database_access")
self.add_permission_view_menu("all_query_access", "all_query_access")
self.add_permission_view_menu("can_csv", "Superset")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this new perm combine both CSV/XLSX etc downloading, and chart/dashboard image downloading? I think that could make sense.

@dpgaspar dpgaspar merged commit 93ba59d into apache:master Jun 13, 2023
@dpgaspar dpgaspar deleted the chore/remove-deprecated-apis-7 branch June 13, 2023 08:31
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 labels Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/L 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants