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
fix(hc): Have ApiInviteHelper work in region silo #43211
Conversation
These changes are targeted toward getting all AuthHelper and AuthIdentityHandler code to run with control silo limits. Most availability errors from AuthIdentityHandler are fixed, but we need more work around the Actor model and ApiInviteHelper to make it stable.
Resolves failures in test_auth_organization_login.
Extract organization_service.handle_invite from auth_service.handle_new_membership to run on the region silo. Replace ApiInviteHelper's request attribute with a new InviteDetail dataclass that can be sent as an RPC parameter.
def get_invite_details(request: Request) -> InviteDetail: | ||
"""Extracts invite details from request session""" | ||
user = request.user | ||
primary_email = UserEmail.objects.get_primary_email(user) if isinstance(user, User) else None |
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.
Longer term we might need to include the primary email address on APIUser
as doing additional RPC calls for emails seems expensive.
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Extract organization_service.handle_invite from auth_service.handle_new_membership to run on the region silo. Replace ApiInviteHelper's request attribute with a new InviteDetail dataclass that can be sent as an RPC parameter.