You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "dpgaspar (via GitHub)" <gi...@apache.org> on 2023/06/12 14:30:20 UTC

[GitHub] [superset] dpgaspar opened a new pull request, #24359: chore: remove deprecated apis estimate_query_cost, results, sql_json, csv

dpgaspar opened a new pull request, #24359:
URL: https://github.com/apache/superset/pull/24359

   ### SUMMARY
   Removes old deprecated APIs:
   - `/superset/estimate_query_cost/...` 
   - `/superset/results/...`
   - `/superset/sql_json/...`
   - `/superset/csv/...`
   
   Effort on removing deprecated APIs from `/superset`: https://github.com/apache/superset/discussions/24332
   
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] 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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro commented on a diff in pull request #24359: chore: remove deprecated apis estimate_query_cost, results, sql_json, csv

Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro commented on code in PR #24359:
URL: https://github.com/apache/superset/pull/24359#discussion_r1227664145


##########
superset-frontend/src/profile/components/fixtures.tsx:
##########
@@ -29,7 +29,6 @@ export const user: UserWithPermissionsAndRoles = {
     ],
     sql_lab: [
       ['menu_access', 'SQL Lab'],
-      ['can_sql_json', 'Superset'],

Review Comment:
   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..



##########
superset/security/manager.py:
##########
@@ -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")

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



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] dpgaspar commented on a diff in pull request #24359: chore: remove deprecated apis estimate_query_cost, results, sql_json, csv

Posted by "dpgaspar (via GitHub)" <gi...@apache.org>.
dpgaspar commented on code in PR #24359:
URL: https://github.com/apache/superset/pull/24359#discussion_r1227742832


##########
superset/security/manager.py:
##########
@@ -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")

Review Comment:
   no strong opinions about it, I'll propose it



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] dpgaspar merged pull request #24359: chore: remove deprecated apis estimate_query_cost, results, sql_json, csv

Posted by "dpgaspar (via GitHub)" <gi...@apache.org>.
dpgaspar merged PR #24359:
URL: https://github.com/apache/superset/pull/24359


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] commented on pull request #24359: chore: remove deprecated apis estimate_query_cost, results, sql_json, csv

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #24359:
URL: https://github.com/apache/superset/pull/24359#issuecomment-1587487392

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/24359?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#24359](https://app.codecov.io/gh/apache/superset/pull/24359?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (dfc9db6) into [master](https://app.codecov.io/gh/apache/superset/commit/2df699c99c56fa2044c77af25438de7d12160ec4?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (2df699c) will **decrease** coverage by `11.17%`.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head dfc9db6 differs from pull request most recent head a2ce663. Consider uploading reports for the commit a2ce663 to get more accurate results
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #24359       +/-   ##
   ===========================================
   - Coverage   69.08%   57.92%   -11.17%     
   ===========================================
     Files        1903     1903               
     Lines       74590    74437      -153     
     Branches     8107     8107               
   ===========================================
   - Hits        51534    43121     -8413     
   - Misses      20945    29205     +8260     
     Partials     2111     2111               
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `?` | |
   | mysql | `?` | |
   | postgres | `?` | |
   | presto | `53.77% <100.00%> (+0.05%)` | :arrow_up: |
   | python | `60.39% <100.00%> (-23.00%)` | :arrow_down: |
   | sqlite | `?` | |
   | unit | `54.26% <66.66%> (+0.05%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://app.codecov.io/gh/apache/superset/pull/24359?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...erset-frontend/src/profile/components/fixtures.tsx](https://app.codecov.io/gh/apache/superset/pull/24359?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Byb2ZpbGUvY29tcG9uZW50cy9maXh0dXJlcy50c3g=) | `100.00% <ø> (ø)` | |
   | [superset/security/manager.py](https://app.codecov.io/gh/apache/superset/pull/24359?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvc2VjdXJpdHkvbWFuYWdlci5weQ==) | `62.06% <100.00%> (-33.87%)` | :arrow_down: |
   | [superset/views/core.py](https://app.codecov.io/gh/apache/superset/pull/24359?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `39.31% <100.00%> (-36.73%)` | :arrow_down: |
   
   ... and [301 files with indirect coverage changes](https://app.codecov.io/gh/apache/superset/pull/24359/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] dpgaspar commented on a diff in pull request #24359: chore: remove deprecated apis estimate_query_cost, results, sql_json, csv

Posted by "dpgaspar (via GitHub)" <gi...@apache.org>.
dpgaspar commented on code in PR #24359:
URL: https://github.com/apache/superset/pull/24359#discussion_r1227740986


##########
superset-frontend/src/profile/components/fixtures.tsx:
##########
@@ -29,7 +29,6 @@ export const user: UserWithPermissionsAndRoles = {
     ],
     sql_lab: [
       ['menu_access', 'SQL Lab'],
-      ['can_sql_json', 'Superset'],

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



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] dpgaspar commented on a diff in pull request #24359: chore: remove deprecated apis estimate_query_cost, results, sql_json, csv

Posted by "dpgaspar (via GitHub)" <gi...@apache.org>.
dpgaspar commented on code in PR #24359:
URL: https://github.com/apache/superset/pull/24359#discussion_r1227589085


##########
superset/security/manager.py:
##########
@@ -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")

Review Comment:
   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. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org