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

fix(hc): Have ApiInviteHelper work in region silo #43211

Closed
wants to merge 6 commits into from

Conversation

RyanSkonnord
Copy link
Member

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.

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
Copy link
Member

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.

Base automatically changed from auth-helper-control-silo-services to master January 26, 2023 03:32
@github-actions
Copy link
Contributor

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 Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@github-actions github-actions bot closed this Feb 24, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Mar 11, 2023
@asottile-sentry asottile-sentry deleted the api-invite-helper-region-silo branch December 1, 2023 16:52
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

2 participants