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

[ENG-4903] Fixes issue with email confirmation links failing due to database congestion #10662

Conversation

uditijmehta
Copy link
Contributor

@uditijmehta uditijmehta commented Jul 9, 2024

Purpose

Move email confirmation to a post-commit task.

Changes

  • Moved send_confirm_email call to a post-commit task in UserEmailsSerializer.
  • Defined send_confirm_email_async to handle email sending after database transactions are committed.

QA Notes

The send_confirm_email function has been refactored to send_confirm_email_async across various parts of the codebase.

  • API User Email Creation (api/users/serializers.py):
    Scenario: Adding a new email address to a user profile.

  • API User Email Resend Confirmation (api/users/views.py):
    Scenario: Resending confirmation email.

  • User Registration (framework/auth/views.py):
    Scenario: New user registration.

  • Resend Confirmation Email (framework/auth/views.py):
    Scenario: Resending a confirmation email.

  • External Login Email Handling (framework/auth/views.py):
    Scenario: Handling email submission for first-time OAuth login user.

  • Resend Confirmation Email from Profile (website/profile/views.py):
    Scenario: Resending a confirmation email from user profile.

  • Update User Profile Emails (website/profile/views.py):
    Scenario: Adding a new email to the user profile.

  • General Email Throttling:
    Scenario: Ensuring email throttling is respected.

Ticket

https://openscience.atlassian.net/browse/ENG-4903

api/users/serializers.py Outdated Show resolved Hide resolved
Copy link
Contributor

@cslzchen cslzchen left a comment

Choose a reason for hiding this comment

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

2nd pass done 🎆 I have a suggestion for QA notes and have a question on using local functions.

framework/auth/views.py Outdated Show resolved Hide resolved
framework/auth/views.py Show resolved Hide resolved
@cslzchen cslzchen changed the title Fixes issue with email confirmation links failing due to database congestion [ENG-4903] Fixes issue with email confirmation links failing due to database congestion Jul 12, 2024
@cslzchen cslzchen changed the base branch from develop to feature/b-and-i-24-14 July 17, 2024 14:44
@cslzchen
Copy link
Contributor

Update: changed base branch to feature/b-and-i-24-14

Copy link
Contributor

@cslzchen cslzchen left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for the quick response and great QA notes.

@cslzchen cslzchen merged commit 975ddb5 into CenterForOpenScience:feature/b-and-i-24-14 Jul 17, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants