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(security): Remove obsolete FAB metric_access permission #16860

Conversation

john-bodley
Copy link
Member

SUMMARY

Per here the metric_access permission is obsolete and not used anywhere.

Note I assume that FAB should clean up after itself and thus no explicit migration is necessary.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

CI.

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 Sep 27, 2021

Codecov Report

Merging #16860 (fd314b7) into master (51090c3) will increase coverage by 2.56%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16860      +/-   ##
==========================================
+ Coverage   66.35%   68.91%   +2.56%     
==========================================
  Files        1569     1613      +44     
  Lines       61692    69565    +7873     
  Branches     6240     6240              
==========================================
+ Hits        40934    47943    +7009     
- Misses      19161    20025     +864     
  Partials     1597     1597              
Flag Coverage Δ
hive 54.30% <ø> (+1.06%) ⬆️
mysql 83.48% <ø> (+1.39%) ⬆️
postgres 83.54% <ø> (+1.39%) ⬆️
presto 54.25% <ø> (+1.17%) ⬆️
python 83.92% <ø> (+1.33%) ⬆️
sqlite 83.27% <ø> (+1.43%) ⬆️

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

Impacted Files Coverage Δ
superset/security/manager.py 94.39% <ø> (+2.43%) ⬆️
superset/commands/importers/v1/examples.py 29.31% <0.00%> (-9.33%) ⬇️
superset/security/api.py 96.96% <0.00%> (-3.04%) ⬇️
superset/dataframe.py 88.88% <0.00%> (-2.78%) ⬇️
superset/reports/notifications/slack.py 85.43% <0.00%> (-1.89%) ⬇️
superset/charts/post_processing.py 67.14% <0.00%> (-1.07%) ⬇️
superset/datasets/schemas.py 96.15% <0.00%> (-0.89%) ⬇️
superset/examples/bart_lines.py 25.00% <0.00%> (-0.81%) ⬇️
superset/common/query_context_processor.py 90.69% <0.00%> (-0.69%) ⬇️
superset/db_engine_specs/teradata.py 89.47% <0.00%> (-0.53%) ⬇️
... and 113 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 51090c3...fd314b7. Read the comment docs.

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.

🔥

Copy link
Member

@dpgaspar dpgaspar left a comment

Choose a reason for hiding this comment

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

@john-bodley this is a custom Superset permission and not a FAB one, FAB will only cleanup registered Flask methods on BaseViews, it will not manage unknown permissions that exist on the DB. So on this case would be nice to add a migration to cleanup

@john-bodley john-bodley force-pushed the john-bodley--security-remove-obsolete-metric_access-permission branch from 9745de1 to 7322703 Compare January 12, 2022 23:43
@john-bodley john-bodley merged commit 85f0715 into master Feb 28, 2022
@john-bodley john-bodley deleted the john-bodley--security-remove-obsolete-metric_access-permission branch February 28, 2022 19:36
villebro pushed a commit that referenced this pull request Apr 3, 2022
* Update manager.py

* Update manager.py

* Update manager.py

* Update manager.py

(cherry picked from commit 85f0715)
@mistercrunch mistercrunch added 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.0 labels Mar 13, 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 lts-v1 size/XS 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants