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): Add loggers to _needs_validation #66364

Merged
merged 2 commits into from Mar 6, 2024

Conversation

schew2381
Copy link
Member

There's a bug where we're no longer requiring superuser access category and reason validation, which is caused by https://github.com/getsentry/sentry/pull/66043/files.

I want to validate what those booleans are in order to find out if this is the cause of the bug.

@schew2381 schew2381 requested review from a team March 5, 2024 21:56
@schew2381 schew2381 self-assigned this Mar 5, 2024
@schew2381 schew2381 requested a review from a team as a code owner March 5, 2024 21:56
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 5, 2024
@schew2381 schew2381 force-pushed the seiji/chore/add-superuser-loggers branch from b9a14e4 to 5cc92d1 Compare March 5, 2024 22:06
@schew2381 schew2381 force-pushed the seiji/chore/add-superuser-loggers branch from 5cc92d1 to 64f7a03 Compare March 5, 2024 22:10
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.29%. Comparing base (c94ad9e) to head (37484da).
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #66364      +/-   ##
==========================================
- Coverage   84.29%   84.29%   -0.01%     
==========================================
  Files        5309     5309              
  Lines      237200   237198       -2     
  Branches    41038    41038              
==========================================
- Hits       199957   199951       -6     
- Misses      37024    37028       +4     
  Partials      219      219              
Files Coverage Δ
src/sentry/api/endpoints/auth_index.py 84.55% <ø> (-0.23%) ⬇️
src/sentry/auth/superuser.py 93.44% <100.00%> (+0.05%) ⬆️

... and 6 files with indirect coverage changes

Comment on lines -36 to -38
DISABLE_SU_FORM_U2F_CHECK_FOR_LOCAL = getattr(
settings, "DISABLE_SU_FORM_U2F_CHECK_FOR_LOCAL", False
)
Copy link
Member Author

Choose a reason for hiding this comment

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

Forgot to remove this in an earlier PR b/c we no longer use this in this file

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

no I changed it recently so we use it in that file, which is what i'm debugging now

@@ -191,7 +191,7 @@ def test_su_access_logs(self, logger):
superuser = Superuser(request, org_id=None)
superuser.set_logged_in(request.user)
assert superuser.is_active is True
assert logger.info.call_count == 2
assert logger.info.call_count == 3
Copy link
Member

Choose a reason for hiding this comment

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

🤷 personally don't think we need to assert logger calls at all

@schew2381 schew2381 merged commit 023103e into master Mar 6, 2024
49 checks passed
@schew2381 schew2381 deleted the seiji/chore/add-superuser-loggers branch March 6, 2024 18:01
aliu3ntry pushed a commit that referenced this pull request Mar 6, 2024
There's a bug where we're no longer requiring superuser access category
and reason validation, which is caused by
https://github.com/getsentry/sentry/pull/66043/files.

I want to validate what those booleans are in order to find out if this
is the cause of the bug.
@github-actions github-actions bot locked and limited conversation to collaborators Mar 22, 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

3 participants