Skip to content

chore: Remove deprecated ENABLE_ACCESS_REQUEST workflow - #24266

Merged
john-bodley merged 1 commit into
apache:masterfrom
john-bodley:john-bodley--remove-enable-access-request
Jun 10, 2023
Merged

john-bodley merged 1 commit into
apache:masterfrom
john-bodley:john-bodley--remove-enable-access-request

Conversation

@john-bodley

@john-bodley john-bodley commented Jun 1, 2023 •

Copy link
Copy Markdown
Member

SUMMARY

This PR partially addresses Superset 3.0 task #9 by removing the previous deprecated ENABLE_ACCESS_REQUEST config parameter and the associated workflows.

The TL;DR is this legacy workflow failed to work post #22022 (which mentions that the API endpoint is deprecated and will be removed in 3.0) when the GET requests became POST requests meaning logic like this and this is currently broken.

Honestly I'm going in somewhat blind in terms of the how/where this logic was used, but the TL;DR is there seems to be no approval logic/workflow if there's no request workflows. Hopefully I've trimmed enough dead code without over pruning, though this has turned somewhat into a yak shaving exercise as—by deleting the /approve endpoint—it led to removing facets of role extension, deleting the granter role, etc.

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

@john-bodley
john-bodley force-pushed the john-bodley--remove-enable-access-request branch 2 times, most recently from 4b422f7 to a7c6abf Compare June 1, 2023 19:17
@pull-request-size pull-request-size Bot added size/L and removed size/XL labels Jun 1, 2023
@john-bodley
john-bodley marked this pull request as ready for review June 1, 2023 20:03
Comment thread superset/views/core.py Outdated

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note this redirect no longer worked as this is being called via a GET yet the redirect URL only accepts a POST.

@john-bodley
john-bodley force-pushed the john-bodley--remove-enable-access-request branch from a7c6abf to eeea8c9 Compare June 1, 2023 20:28
@pull-request-size pull-request-size Bot added size/XL and removed size/L labels Jun 1, 2023
@codecov

codecov Bot commented Jun 1, 2023 •

Copy link
Copy Markdown

Codecov Report

Merging #24266 (1263551) into master (4e47771) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 1263551 differs from pull request most recent head dc2a4d1. Consider uploading reports for the commit dc2a4d1 to get more accurate results

@@           Coverage Diff            @@
##           master   #24266    +/-   ##
========================================
  Coverage   69.08%   69.09%            
========================================
  Files        1905     1903     -2     
  Lines       74813    74608   -205     
  Branches     8107     8107            
========================================
- Hits        51686    51550   -136     
+ Misses      21016    20947    -69     
  Partials     2111     2111            
Flag Coverage Δ
hive 53.79% <100.00%> (+0.10%) ⬆️
javascript 55.62% <ø> (ø)
mysql 79.39% <100.00%> (+0.07%) ⬆️
postgres 79.46% <100.00%> (+0.07%) ⬆️
presto 53.71% <100.00%> (+0.10%) ⬆️
python 83.38% <100.00%> (+0.09%) ⬆️
sqlite 77.99% <100.00%> (+0.06%) ⬆️
unit 54.20% <100.00%> (+0.11%) ⬆️

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

Impacted Files Coverage Δ
superset/config.py 91.97% <ø> (-0.03%) ⬇️
superset/initialization/__init__.py 91.35% <ø> (-0.06%) ⬇️
superset/security/manager.py 95.92% <ø> (-0.02%) ⬇️
superset/views/__init__.py 100.00% <ø> (ø)
superset/views/core.py 76.24% <ø> (+0.96%) ⬆️
superset/explore/commands/get.py 90.42% <100.00%> (+1.65%) ⬆️
superset/models/__init__.py 100.00% <100.00%> (ø)
superset/utils/core.py 91.55% <100.00%> (-0.05%) ⬇️

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

@john-bodley
john-bodley force-pushed the john-bodley--remove-enable-access-request branch 3 times, most recently from f949506 to 8c9dd8b Compare June 1, 2023 23:27
@john-bodley
john-bodley force-pushed the john-bodley--remove-enable-access-request branch from 8c9dd8b to fb6f391 Compare June 7, 2023 19:04
@john-bodley
john-bodley requested a review from a team as a code owner June 7, 2023 19:04
@john-bodley
john-bodley force-pushed the john-bodley--remove-enable-access-request branch 4 times, most recently from 9e825ba to 44f918b Compare June 9, 2023 00:39

@dpgaspar dpgaspar left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It seems that probably makes sense to remove /superset/override_role_permissions also, since it seems related with is granter role. See if you agree and I'll close: #24334

@john-bodley
john-bodley force-pushed the john-bodley--remove-enable-access-request branch 2 times, most recently from f2f9cb5 to 17b5020 Compare June 9, 2023 01:28
@john-bodley

john-bodley commented Jun 9, 2023 •

Copy link
Copy Markdown
Member Author

@dpgaspar I agree with your comment as I went down this path previously but didn't know how far I should go. This also makes the granter role obsolete.

@john-bodley
john-bodley force-pushed the john-bodley--remove-enable-access-request branch 2 times, most recently from d2be248 to 6511cb2 Compare June 9, 2023 06:13

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Love how removing some tests exposed the non-idempotent facets of others.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since we're only asserting fields that are listed here (see lines 375-377), maybe we can just remove this line? I'm not sure we really need to assert the uid, as I assume doing this assertion will fail when running this test in isolation.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll use mock.ANY.

@villebro villebro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great to see this dead code being removed, as this has caused a lot of confusion over the years. If this type of functionality really is needed, it should probably be done slightly differently, using pluggable FAB views/classes etc that don't require this much logic in the main codebase.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since we're only asserting fields that are listed here (see lines 375-377), maybe we can just remove this line? I'm not sure we really need to assert the uid, as I assume doing this assertion will fail when running this test in isolation.

@john-bodley
john-bodley force-pushed the john-bodley--remove-enable-access-request branch 3 times, most recently from 726adbc to 2d82c46 Compare June 9, 2023 23:05
@john-bodley
john-bodley force-pushed the john-bodley--remove-enable-access-request branch from 2d82c46 to dc2a4d1 Compare June 9, 2023 23:06
@john-bodley
john-bodley merged commit 0e3f1f6 into apache:master Jun 10, 2023
@eschutho

Copy link
Copy Markdown
Member

@john-bodley just to be on the safe side, I'm going to mark this as a possible breaking change. Do you think we should add anything to the UPDATING.md file re the changes?

@eschutho eschutho added the risk:breaking-change Issues or PRs that will introduce breaking changes label Jun 12, 2023
@michael-s-molina michael-s-molina added the v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch label Jun 12, 2023
@michael-s-molina michael-s-molina removed the v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch label Jun 26, 2023
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 First shipped in 3.0.0 labels Mar 8, 2024
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
Ujjwaljain16 added a commit to Ujjwaljain16/superset that referenced this pull request Sep 17, 2026
Two small fixes from rebenitez1802's approval review:

- The delete migration's docstring cited PR apache#23714 as the removal of
  can_override_role_permissions. Verified against the actual PR: apache#23714
  only added the @deprecated() decorator; the endpoint itself (the
  method, its @expose, and its tests) was deleted later, in PR apache#24266.
  Docstring now cites both correctly.

- Added the regression test gabotorresruiz proposed, pinning that
  can_copy_dash is the only write-level rename in PVM_MAP. They showed
  this by hand -- reintroducing can_testconn -> Database.can_write
  locally still passed all 161 existing tests, meaning nothing would
  catch that exact regression recurring. Verified the same way before
  adding it: constructed the regression in an isolated script (never
  touching the tracked file) and confirmed the new assertion fails
  against it while passing against the current PVM_MAP.

Also merges another master-side Alembic head split that landed since
the last push: master resolved its own theme-editors/purge-audit head
conflict with a new merge migration, which doesn't chain from ours,
so the branch was back to 2 heads. Added one more small merge migration
reconciling the two. Verified via master's own new
tests/unit_tests/migrations/test_single_migration_head.py (added in
this same master pull) rather than just this branch's own head-counting
script.
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 risk:breaking-change Issues or PRs that will introduce breaking changes size/XXL 🚢 3.0.0 First shipped in 3.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants