Closed sentry-io[bot] closed 8 months ago
@amakarudze Hi could you please explain the bug how to reproduce it and what should be the desired output So i can work on this bug? Thank you.
Sorry @mdehsan873 for taking so long to respond to you. Let me try and explain the issue happening here:
The concept is when we have a new event, we create a new @djangogirls.org
email address for the event. This is covered by create_gmail_account(event)
here. When an event has already happened in that city, one of these two scenarios can be true:
migrate_gmail_account(new_event, slug)
hereI have checked the error logs and noticed there are two breakpoints for the migrate_gmail_account(new_event, slug)
function. The first one is when trying to rename the old account here, the email is not found or doesn't exist. I have manually checked for the emails that had failed to be migrated by searching for them in the Google Admin console and I didn't find them as well. This gives a 404
error. We get the old email through the make_email(slug)
function here.
PATCH https://admin.googleapis.com/admin/directory/v1/users/loja-3%40djangogirls.org [404]
The second instance is after renaming the account, the account will have become an alias and we don't want the alias so we try to delete the account here. The alias again is not found and gives the 404
error.
My thinking is we need to handle two things:
-3
to the slug should fix this.Reproducing this may be too complex as it requires a service account with access to our domain. I have just started looking at this, so maybe we can share thoughts.
Sentry Issue: DJANGO-GIRLS-WEBSITE-5C