Browse Source

fix(hc): Fix silo mode for auth channel login (#57519)

Matt Duncan 1 year ago
parent
commit
bd61b58f17

+ 2 - 0
src/sentry/web/frontend/auth_channel_login.py

@@ -8,8 +8,10 @@ from sentry.models.organization import Organization
 from sentry.services.hybrid_cloud.organization import organization_service
 from sentry.utils.auth import is_valid_redirect
 from sentry.web.frontend.auth_organization_login import AuthOrganizationLoginView
+from sentry.web.frontend.base import control_silo_view
 
 
+@control_silo_view
 class AuthChannelLoginView(AuthOrganizationLoginView):
     @method_decorator(never_cache)
     def handle(self, request, channel, resource_id):

+ 2 - 2
tests/sentry/web/frontend/test_auth_channel_login.py

@@ -3,10 +3,10 @@ from django.urls import reverse
 from sentry.auth.providers.fly.provider import FlyOAuth2Provider
 from sentry.models.authprovider import AuthProvider
 from sentry.testutils.cases import TestCase
-from sentry.testutils.silo import region_silo_test
+from sentry.testutils.silo import control_silo_test
 
 
-@region_silo_test
+@control_silo_test(stable=True)
 class AuthOrganizationChannelLoginTest(TestCase):
     def create_auth_provider(self, partner_org_id, sentry_org_id):
         config_data = FlyOAuth2Provider.build_config(resource={"id": partner_org_id})