Skip to content

chore(options): remove 94 unused registered options#115457

Draft
joshuarli wants to merge 1 commit into
masterfrom
options-delete-all-safe-candidates
Draft

chore(options): remove 94 unused registered options#115457
joshuarli wants to merge 1 commit into
masterfrom
options-delete-all-safe-candidates

Conversation

@joshuarli
Copy link
Copy Markdown
Member

Static analysis + dynamic attribution found no usage in sentry or getsentry for these 94 registered options. 93 removed from src/sentry/options/defaults.py and 1 from
src/sentry/hybridcloud/options.py.

10 additional unused options in getsentry/models/init.py are handled separately.

Static analysis + dynamic attribution found no usage in sentry or
getsentry for these 94 registered options. 93 removed from
src/sentry/options/defaults.py and 1 from
src/sentry/hybridcloud/options.py.

10 additional unused options in getsentry/models/__init__.py are
handled separately.
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

Backend Test Failures

Failures on d771962 in this run:

tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py::AcceptOrganizationInviteTest__InMonolithMode::test_org_member_does_not_existlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:544: in test_org_member_does_not_exist
    self.setup_u2f(om)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:434: in setup_u2f
    return self.get_success_response(
src/sentry/testutils/cases.py:641: in get_success_response
    assert_status_code(response, 200, 300)
src/sentry/testutils/asserts.py:46: in assert_status_code
    assert minimum <= response.status_code < maximum, response
E   AssertionError: <Response status_code=500, "application/json">
E   assert 500 < 300
E    +  where 500 = <Response status_code=500, "application/json">.status_code
tests/sentry/users/models/test_authenticator.py::AuthenticatorTest::test_user_has_2falog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/options/manager.py:223: in lookup_key
    return self.registry[key]
           ^^^^^^^^^^^^^^^^^^
E   KeyError: 'recovery.disallow-new-enrollment'

During handling of the above exception, another exception occurred:
tests/sentry/users/models/test_authenticator.py:22: in test_user_has_2fa
    RecoveryCodeInterface().enroll(user)
src/sentry/auth/authenticators/base.py:162: in enroll
    if self.disallow_new_enrollment:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/auth/authenticators/base.py:108: in disallow_new_enrollment
    return bool(options.get(f"{self.interface_id}.disallow-new-enrollment"))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:295: in get
    opt = self.lookup_key(key)
          ^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:233: in lookup_key
    raise UnknownOption(key)
E   sentry.options.manager.UnknownOption: 'recovery.disallow-new-enrollment'
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py::AcceptOrganizationInviteTest::test_accept_pending_invite__totp_enrolllog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:502: in test_accept_pending_invite__totp_enroll
    resp = self.get_success_response(
src/sentry/testutils/cases.py:641: in get_success_response
    assert_status_code(response, 200, 300)
src/sentry/testutils/asserts.py:46: in assert_status_code
    assert minimum <= response.status_code < maximum, response
E   AssertionError: <Response status_code=500, "application/json">
E   assert 500 < 300
E    +  where 500 = <Response status_code=500, "application/json">.status_code
tests/sentry/web/frontend/test_auth_organization_login.py::OrganizationAuthLoginTest::test_correct_redirect_as_2fa_user_no_membershiplog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/options/manager.py:223: in lookup_key
    return self.registry[key]
           ^^^^^^^^^^^^^^^^^^
E   KeyError: 'recovery.disallow-new-enrollment'

During handling of the above exception, another exception occurred:
tests/sentry/web/frontend/test_auth_organization_login.py:994: in test_correct_redirect_as_2fa_user_no_membership
    RecoveryCodeInterface().enroll(user)
src/sentry/auth/authenticators/base.py:162: in enroll
    if self.disallow_new_enrollment:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/auth/authenticators/base.py:108: in disallow_new_enrollment
    return bool(options.get(f"{self.interface_id}.disallow-new-enrollment"))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:295: in get
    opt = self.lookup_key(key)
          ^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:233: in lookup_key
    raise UnknownOption(key)
E   sentry.options.manager.UnknownOption: 'recovery.disallow-new-enrollment'
tests/sentry/users/api/endpoints/test_user_authenticator_details.py::UserAuthenticatorDetailsTest::test_delete_non_last_authenticator_keeps_recovery_codeslog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/options/manager.py:223: in lookup_key
    return self.registry[key]
           ^^^^^^^^^^^^^^^^^^
E   KeyError: 'recovery.disallow-new-enrollment'

During handling of the above exception, another exception occurred:
tests/sentry/users/api/endpoints/test_user_authenticator_details.py:467: in test_delete_non_last_authenticator_keeps_recovery_codes
    Authenticator.objects.auto_add_recovery_codes(self.user)
src/sentry/users/models/authenticator.py:96: in auto_add_recovery_codes
    interface.enroll(user)
src/sentry/auth/authenticators/base.py:162: in enroll
    if self.disallow_new_enrollment:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/auth/authenticators/base.py:108: in disallow_new_enrollment
    return bool(options.get(f"{self.interface_id}.disallow-new-enrollment"))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:295: in get
    opt = self.lookup_key(key)
          ^^^^^^^^^^^^^^^^^^^^
src/sentry/testutils/helpers/options.py:34: in new_lookup
    return original_lookup(self, key)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:233: in lookup_key
    raise UnknownOption(key)
E   sentry.options.manager.UnknownOption: 'recovery.disallow-new-enrollment'
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py::AcceptOrganizationInviteTest::test_enroll_without_pending_invite__no_errorlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:582: in test_enroll_without_pending_invite__no_error
    self.get_success_response(
src/sentry/testutils/cases.py:641: in get_success_response
    assert_status_code(response, 200, 300)
src/sentry/testutils/asserts.py:46: in assert_status_code
    assert minimum <= response.status_code < maximum, response
E   AssertionError: <Response status_code=500, "application/json">
E   assert 500 < 300
E    +  where 500 = <Response status_code=500, "application/json">.status_code
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py::AcceptOrganizationInviteTest__InMonolithMode::test_enroll_without_pending_invite__no_errorlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:582: in test_enroll_without_pending_invite__no_error
    self.get_success_response(
src/sentry/testutils/cases.py:641: in get_success_response
    assert_status_code(response, 200, 300)
src/sentry/testutils/asserts.py:46: in assert_status_code
    assert minimum <= response.status_code < maximum, response
E   AssertionError: <Response status_code=500, "application/json">
E   assert 500 < 300
E    +  where 500 = <Response status_code=500, "application/json">.status_code
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py::AcceptOrganizationInviteTest__InMonolithMode::test_accept_pending_invite__totp_enrolllog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:502: in test_accept_pending_invite__totp_enroll
    resp = self.get_success_response(
src/sentry/testutils/cases.py:641: in get_success_response
    assert_status_code(response, 200, 300)
src/sentry/testutils/asserts.py:46: in assert_status_code
    assert minimum <= response.status_code < maximum, response
E   AssertionError: <Response status_code=500, "application/json">
E   assert 500 < 300
E    +  where 500 = <Response status_code=500, "application/json">.status_code
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py::AcceptOrganizationInviteTest::test_invalid_tokenlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:567: in test_invalid_token
    self.setup_u2f(om)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:434: in setup_u2f
    return self.get_success_response(
src/sentry/testutils/cases.py:641: in get_success_response
    assert_status_code(response, 200, 300)
src/sentry/testutils/asserts.py:46: in assert_status_code
    assert minimum <= response.status_code < maximum, response
E   AssertionError: <Response status_code=500, "application/json">
E   assert 500 < 300
E    +  where 500 = <Response status_code=500, "application/json">.status_code
tests/sentry/users/api/endpoints/test_user_authenticator_details.py::UserAuthenticatorDetailsTest::test_delete_last_authenticator_removes_recovery_codeslog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/options/manager.py:223: in lookup_key
    return self.registry[key]
           ^^^^^^^^^^^^^^^^^^
E   KeyError: 'recovery.disallow-new-enrollment'

During handling of the above exception, another exception occurred:
tests/sentry/users/api/endpoints/test_user_authenticator_details.py:448: in test_delete_last_authenticator_removes_recovery_codes
    Authenticator.objects.auto_add_recovery_codes(self.user)
src/sentry/users/models/authenticator.py:96: in auto_add_recovery_codes
    interface.enroll(user)
src/sentry/auth/authenticators/base.py:162: in enroll
    if self.disallow_new_enrollment:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/auth/authenticators/base.py:108: in disallow_new_enrollment
    return bool(options.get(f"{self.interface_id}.disallow-new-enrollment"))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:295: in get
    opt = self.lookup_key(key)
          ^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:233: in lookup_key
    raise UnknownOption(key)
E   sentry.options.manager.UnknownOption: 'recovery.disallow-new-enrollment'
tests/sentry/users/api/endpoints/test_user_authenticator_details.py::UserAuthenticatorDetailsTest::test_get_recovery_codeslog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/options/manager.py:223: in lookup_key
    return self.registry[key]
           ^^^^^^^^^^^^^^^^^^
E   KeyError: 'recovery.disallow-new-enrollment'

During handling of the above exception, another exception occurred:
tests/sentry/users/api/endpoints/test_user_authenticator_details.py:222: in test_get_recovery_codes
    interface.enroll(self.user)
src/sentry/auth/authenticators/base.py:162: in enroll
    if self.disallow_new_enrollment:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/auth/authenticators/base.py:108: in disallow_new_enrollment
    return bool(options.get(f"{self.interface_id}.disallow-new-enrollment"))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:295: in get
    opt = self.lookup_key(key)
          ^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:233: in lookup_key
    raise UnknownOption(key)
E   sentry.options.manager.UnknownOption: 'recovery.disallow-new-enrollment'
tests/sentry/web/frontend/test_auth_organization_login.py::OrganizationAuthLoginTest::test_correct_redirect_as_2fa_user_single_org_memberlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/options/manager.py:223: in lookup_key
    return self.registry[key]
           ^^^^^^^^^^^^^^^^^^
E   KeyError: 'recovery.disallow-new-enrollment'

During handling of the above exception, another exception occurred:
tests/sentry/web/frontend/test_auth_organization_login.py:1008: in test_correct_redirect_as_2fa_user_single_org_member
    RecoveryCodeInterface().enroll(user)
src/sentry/auth/authenticators/base.py:162: in enroll
    if self.disallow_new_enrollment:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/auth/authenticators/base.py:108: in disallow_new_enrollment
    return bool(options.get(f"{self.interface_id}.disallow-new-enrollment"))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:295: in get
    opt = self.lookup_key(key)
          ^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:233: in lookup_key
    raise UnknownOption(key)
E   sentry.options.manager.UnknownOption: 'recovery.disallow-new-enrollment'
tests/sentry/web/frontend/test_auth_organization_login.py::OrganizationAuthLoginTest::test_correct_redirect_as_2fa_user_single_org_no_membershiplog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/options/manager.py:223: in lookup_key
    return self.registry[key]
           ^^^^^^^^^^^^^^^^^^
E   KeyError: 'recovery.disallow-new-enrollment'

During handling of the above exception, another exception occurred:
tests/sentry/web/frontend/test_auth_organization_login.py:982: in test_correct_redirect_as_2fa_user_single_org_no_membership
    RecoveryCodeInterface().enroll(user)
src/sentry/auth/authenticators/base.py:162: in enroll
    if self.disallow_new_enrollment:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/auth/authenticators/base.py:108: in disallow_new_enrollment
    return bool(options.get(f"{self.interface_id}.disallow-new-enrollment"))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:295: in get
    opt = self.lookup_key(key)
          ^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:233: in lookup_key
    raise UnknownOption(key)
E   sentry.options.manager.UnknownOption: 'recovery.disallow-new-enrollment'
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py::AcceptOrganizationInviteTest::test_accept_pending_invite__u2f_enrolllog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:452: in test_accept_pending_invite__u2f_enroll
    resp = self.setup_u2f(om)
           ^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:434: in setup_u2f
    return self.get_success_response(
src/sentry/testutils/cases.py:641: in get_success_response
    assert_status_code(response, 200, 300)
src/sentry/testutils/asserts.py:46: in assert_status_code
    assert minimum <= response.status_code < maximum, response
E   AssertionError: <Response status_code=500, "application/json">
E   assert 500 < 300
E    +  where 500 = <Response status_code=500, "application/json">.status_code
tests/sentry/web/frontend/test_auth_organization_login.py::OrganizationAuthLoginTest::test_correct_redirect_as_2fa_user_invitedlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/options/manager.py:223: in lookup_key
    return self.registry[key]
           ^^^^^^^^^^^^^^^^^^
E   KeyError: 'recovery.disallow-new-enrollment'

During handling of the above exception, another exception occurred:
tests/sentry/web/frontend/test_auth_organization_login.py:960: in test_correct_redirect_as_2fa_user_invited
    RecoveryCodeInterface().enroll(user)
src/sentry/auth/authenticators/base.py:162: in enroll
    if self.disallow_new_enrollment:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/auth/authenticators/base.py:108: in disallow_new_enrollment
    return bool(options.get(f"{self.interface_id}.disallow-new-enrollment"))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:295: in get
    opt = self.lookup_key(key)
          ^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:233: in lookup_key
    raise UnknownOption(key)
E   sentry.options.manager.UnknownOption: 'recovery.disallow-new-enrollment'
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py::AcceptOrganizationInviteTest__InMonolithMode::test_accept_pending_invite__sms_enrolllog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:471: in test_accept_pending_invite__sms_enroll
    resp = self.get_success_response(
src/sentry/testutils/cases.py:641: in get_success_response
    assert_status_code(response, 200, 300)
src/sentry/testutils/asserts.py:46: in assert_status_code
    assert minimum <= response.status_code < maximum, response
E   AssertionError: <Response status_code=500, "application/json">
E   assert 500 < 300
E    +  where 500 = <Response status_code=500, "application/json">.status_code
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py::AcceptOrganizationInviteTest__InMonolithMode::test_invalid_tokenlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:567: in test_invalid_token
    self.setup_u2f(om)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:434: in setup_u2f
    return self.get_success_response(
src/sentry/testutils/cases.py:641: in get_success_response
    assert_status_code(response, 200, 300)
src/sentry/testutils/asserts.py:46: in assert_status_code
    assert minimum <= response.status_code < maximum, response
E   AssertionError: <Response status_code=500, "application/json">
E   assert 500 < 300
E    +  where 500 = <Response status_code=500, "application/json">.status_code
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py::UserAuthenticatorEnrollTest::test_sms_can_enrolllog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:176: in test_sms_can_enroll
    self.get_success_response(
src/sentry/testutils/cases.py:641: in get_success_response
    assert_status_code(response, 200, 300)
src/sentry/testutils/asserts.py:46: in assert_status_code
    assert minimum <= response.status_code < maximum, response
E   AssertionError: <Response status_code=500, "application/json">
E   assert 500 < 300
E    +  where 500 = <Response status_code=500, "application/json">.status_code
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py::AcceptOrganizationInviteTest__InMonolithMode::test_accept_pending_invite__u2f_enrolllog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:452: in test_accept_pending_invite__u2f_enroll
    resp = self.setup_u2f(om)
           ^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:434: in setup_u2f
    return self.get_success_response(
src/sentry/testutils/cases.py:641: in get_success_response
    assert_status_code(response, 200, 300)
src/sentry/testutils/asserts.py:46: in assert_status_code
    assert minimum <= response.status_code < maximum, response
E   AssertionError: <Response status_code=500, "application/json">
E   assert 500 < 300
E    +  where 500 = <Response status_code=500, "application/json">.status_code
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py::AcceptOrganizationInviteTest::test_org_member_does_not_existlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:544: in test_org_member_does_not_exist
    self.setup_u2f(om)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:434: in setup_u2f
    return self.get_success_response(
src/sentry/testutils/cases.py:641: in get_success_response
    assert_status_code(response, 200, 300)
src/sentry/testutils/asserts.py:46: in assert_status_code
    assert minimum <= response.status_code < maximum, response
E   AssertionError: <Response status_code=500, "application/json">
E   assert 500 < 300
E    +  where 500 = <Response status_code=500, "application/json">.status_code
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py::UserAuthenticatorEnrollTest::test_totp_can_enrolllog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:58: in test_totp_can_enroll
    self.get_success_response(
src/sentry/testutils/cases.py:641: in get_success_response
    assert_status_code(response, 200, 300)
src/sentry/testutils/asserts.py:46: in assert_status_code
    assert minimum <= response.status_code < maximum, response
E   AssertionError: <Response status_code=500, "application/json">
E   assert 500 < 300
E    +  where 500 = <Response status_code=500, "application/json">.status_code
tests/sentry/web/frontend/test_auth_login.py::AuthLoginTest::test_login_valid_credentials_2fa_redirectlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/options/manager.py:223: in lookup_key
    return self.registry[key]
           ^^^^^^^^^^^^^^^^^^
E   KeyError: 'recovery.disallow-new-enrollment'

During handling of the above exception, another exception occurred:
tests/sentry/web/frontend/test_auth_login.py:181: in test_login_valid_credentials_2fa_redirect
    RecoveryCodeInterface().enroll(user)
src/sentry/auth/authenticators/base.py:162: in enroll
    if self.disallow_new_enrollment:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/auth/authenticators/base.py:108: in disallow_new_enrollment
    return bool(options.get(f"{self.interface_id}.disallow-new-enrollment"))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:295: in get
    opt = self.lookup_key(key)
          ^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:233: in lookup_key
    raise UnknownOption(key)
E   sentry.options.manager.UnknownOption: 'recovery.disallow-new-enrollment'
tests/sentry/users/api/endpoints/test_user_authenticator_details.py::UserAuthenticatorDetailsTest::test_recovery_codes_regeneratelog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/options/manager.py:223: in lookup_key
    return self.registry[key]
           ^^^^^^^^^^^^^^^^^^
E   KeyError: 'recovery.disallow-new-enrollment'

During handling of the above exception, another exception occurred:
tests/sentry/users/api/endpoints/test_user_authenticator_details.py:271: in test_recovery_codes_regenerate
    interface.enroll(self.user)
src/sentry/auth/authenticators/base.py:162: in enroll
    if self.disallow_new_enrollment:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/auth/authenticators/base.py:108: in disallow_new_enrollment
    return bool(options.get(f"{self.interface_id}.disallow-new-enrollment"))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:295: in get
    opt = self.lookup_key(key)
          ^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:233: in lookup_key
    raise UnknownOption(key)
E   sentry.options.manager.UnknownOption: 'recovery.disallow-new-enrollment'
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py::AcceptOrganizationInviteTest__InMonolithMode::test_user_already_org_memberlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:519: in test_user_already_org_member
    self.setup_u2f(om)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:434: in setup_u2f
    return self.get_success_response(
src/sentry/testutils/cases.py:641: in get_success_response
    assert_status_code(response, 200, 300)
src/sentry/testutils/asserts.py:46: in assert_status_code
    assert minimum <= response.status_code < maximum, response
E   AssertionError: <Response status_code=500, "application/json">
E   assert 500 < 300
E    +  where 500 = <Response status_code=500, "application/json">.status_code
tests/sentry/core/endpoints/test_organization_member_details.py::ResetOrganizationMember2faTest::test_owner_can_only_reset_member_2falog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/options/manager.py:223: in lookup_key
    return self.registry[key]
           ^^^^^^^^^^^^^^^^^^
E   KeyError: 'recovery.disallow-new-enrollment'

During handling of the above exception, another exception occurred:
tests/sentry/core/endpoints/test_organization_member_details.py:1418: in test_owner_can_only_reset_member_2fa
    recovery.enroll(self.user)
src/sentry/auth/authenticators/base.py:162: in enroll
    if self.disallow_new_enrollment:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/auth/authenticators/base.py:108: in disallow_new_enrollment
    return bool(options.get(f"{self.interface_id}.disallow-new-enrollment"))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:295: in get
    opt = self.lookup_key(key)
          ^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:233: in lookup_key
    raise UnknownOption(key)
E   sentry.options.manager.UnknownOption: 'recovery.disallow-new-enrollment'
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py::AcceptOrganizationInviteTest::test_user_already_org_memberlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:519: in test_user_already_org_member
    self.setup_u2f(om)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/contextlib.py:85: in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:434: in setup_u2f
    return self.get_success_response(
src/sentry/testutils/cases.py:641: in get_success_response
    assert_status_code(response, 200, 300)
src/sentry/testutils/asserts.py:46: in assert_status_code
    assert minimum <= response.status_code < maximum, response
E   AssertionError: <Response status_code=500, "application/json">
E   assert 500 < 300
E    +  where 500 = <Response status_code=500, "application/json">.status_code
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py::UserAuthenticatorEnrollTest::test_u2f_can_enrolllog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:271: in test_u2f_can_enroll
    self.get_success_response(
src/sentry/testutils/cases.py:641: in get_success_response
    assert_status_code(response, 200, 300)
src/sentry/testutils/asserts.py:46: in assert_status_code
    assert minimum <= response.status_code < maximum, response
E   AssertionError: <Response status_code=500, "application/json">
E   assert 500 < 300
E    +  where 500 = <Response status_code=500, "application/json">.status_code
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py::UserAuthenticatorEnrollTest::test_u2f_superuser_and_staff_cannot_enroll_other_userlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py:329: in test_u2f_superuser_and_staff_cannot_enroll_other_user
    self.get_success_response(
src/sentry/testutils/cases.py:641: in get_success_response
    assert_status_code(response, 200, 300)
src/sentry/testutils/asserts.py:46: in assert_status_code
    assert minimum <= response.status_code < maximum, response
E   AssertionError: <Response status_code=500, "application/json">
E   assert 500 < 300
E    +  where 500 = <Response status_code=500, "application/json">.status_code
tests/sentry/users/api/endpoints/test_user_authenticator_index.py::UserAuthenticatorIndexTest::test_list_all_authenticatorslog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/users/api/endpoints/test_user_authenticator_index.py:18: in test_list_all_authenticators
    interface = [i for i in resp.data if i["id"] == "totp"][0]
                                         ^^^^^^^
E   TypeError: 'NoneType' object is not subscriptable
tests/sentry/web/frontend/test_auth_organization_login.py::OrganizationAuthLoginTest::test_correct_redirect_as_2fa_user_single_org_invitedlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/options/manager.py:223: in lookup_key
    return self.registry[key]
           ^^^^^^^^^^^^^^^^^^
E   KeyError: 'recovery.disallow-new-enrollment'

During handling of the above exception, another exception occurred:
tests/sentry/web/frontend/test_auth_organization_login.py:940: in test_correct_redirect_as_2fa_user_single_org_invited
    RecoveryCodeInterface().enroll(user)
src/sentry/auth/authenticators/base.py:162: in enroll
    if self.disallow_new_enrollment:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/auth/authenticators/base.py:108: in disallow_new_enrollment
    return bool(options.get(f"{self.interface_id}.disallow-new-enrollment"))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:295: in get
    opt = self.lookup_key(key)
          ^^^^^^^^^^^^^^^^^^^^
src/sentry/options/manager.py:233: in lookup_key
    raise UnknownOption(key)
E   sentry.options.manager.UnknownOption: 'recovery.disallow-new-enrollment'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant