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(superuser): use option for read-write instead of FF #70083

Merged
merged 1 commit into from
May 1, 2024

Conversation

cathteng
Copy link
Member

@cathteng cathteng commented May 1, 2024

Part 1 of replacing the superuser read-write feature flag with an option. There's code in getsentry that is using the flag, so we can't completely remove it yet.

The flag is not currently turned on, so using an OR for either the option or the flag for the logic is fine. This will be temporary.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label May 1, 2024
@cathteng cathteng requested review from schew2381 and a team May 1, 2024 20:15
Comment on lines +84 to +87
and (
options.get("superuser.read-write.ga-rollout")
or features.has("auth:enterprise-superuser-read-write", actor=user)
)
Copy link
Member Author

Choose a reason for hiding this comment

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

will be replacing logic like this with just the option later

@cathteng cathteng marked this pull request as ready for review May 1, 2024 20:31
@cathteng cathteng requested review from a team as code owners May 1, 2024 20:31
Comment on lines +114 to +117
if not (
features.has("auth:enterprise-superuser-read-write", actor=request.user)
or options.get("superuser.read-write.ga-rollout")
):
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 the only other code change besides adding the option, everything else is modifying test decorators

Copy link

codecov bot commented May 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.83%. Comparing base (e355dc0) to head (f663080).
Report is 6 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #70083       +/-   ##
===========================================
+ Coverage   62.92%   79.83%   +16.90%     
===========================================
  Files        6496     6502        +6     
  Lines      288948   289236      +288     
  Branches    49777    49810       +33     
===========================================
+ Hits       181821   230907    +49086     
+ Misses     106710    57918    -48792     
+ Partials      417      411        -6     
Files Coverage Δ
src/sentry/auth/superuser.py 93.44% <100.00%> (+18.03%) ⬆️
src/sentry/options/defaults.py 100.00% <100.00%> (ø)

... and 1765 files with indirect coverage changes

@cathteng cathteng enabled auto-merge (squash) May 1, 2024 20:46
@cathteng cathteng merged commit 70e9bfd into master May 1, 2024
50 checks passed
@cathteng cathteng deleted the cathy/superuser/use-option branch May 1, 2024 20:48
@github-actions github-actions bot locked and limited conversation to collaborators May 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants