-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
feat(relocation): Enable globally for superusers #61822
Conversation
Superusers (aka admins) will no be able to hit the relocation endpoint successfully in all deployments. The `relocation:enabled` flag, and the `relocation.enabled` option that controls it, will instead refer only to the self-serve endpoint, which will remain contained to the test region for now. This means that admins can now trigger relocations in any region for any user, and are not throttled when they do so. Regular users may only trigger relocations for themselves in regions where `relocations.enabled` is set to `True`, and are subject to the global daily throttles. Issue: getsentry/team-ospo#214
b9acd7a
to
137e966
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #61822 +/- ##
==========================================
- Coverage 81.20% 81.20% -0.01%
==========================================
Files 5187 5187
Lines 228307 228390 +83
Branches 38294 38313 +19
==========================================
+ Hits 185406 185460 +54
- Misses 37269 37292 +23
- Partials 5632 5638 +6
|
) | ||
|
||
# Only superusers can start relocations for other users. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to be extra safe here, but just thinking if this would ever be a problem. Since the only time I'm thinking someone is allowed to enter in the owner of a relocation is in the admin panel
except KeyError: | ||
return Response( | ||
{"detail": ERR_UNKNOWN_RELOCATION_STATUS.substitute(status=status_str)}, | ||
status=400, | ||
status=status.HTTP_400_BAD_REQUEST, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catches here on using status
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Superusers (aka admins) will now be able to hit the relocation endpoint successfully in all deployments. The
relocation:enabled
flag, and therelocation.enabled
option that controls it, will instead refer only to the self-serve endpoint, which will remain contained to the test region for now.This means that admins can now trigger relocations in any region for any user, and are not throttled when they do so. Regular users may only trigger relocations for themselves in regions where
relocations.enabled
is set toTrue
, and are subject to the global daily throttles.Issue: getsentry/team-ospo#214