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(backup): UserEmail handling #55433

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

azaslavsky
Copy link
Contributor

The previous code assumed UserEmail collisions are possible. It is now refactored to treat them all as unique, and always reset them from their imported state for all ImportScopes except Global.

Issue: getsentry/team-ospo#181

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 30, 2023
@azaslavsky azaslavsky force-pushed the azaslavsky/backup/model_save branch 2 times, most recently from 556eb2f to 0108471 Compare August 30, 2023 18:21
@azaslavsky azaslavsky force-pushed the azaslavsky/backup/useremail_validation branch from 1dbdd42 to 1b328fc Compare August 30, 2023 18:21
@azaslavsky azaslavsky requested a review from markstory August 30, 2023 18:48
Copy link
Member

@markstory markstory left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@azaslavsky azaslavsky force-pushed the azaslavsky/backup/useremail_validation branch from 1b328fc to c4a3284 Compare August 30, 2023 23:19
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Aug 30, 2023
@github-actions
Copy link
Contributor

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

@azaslavsky azaslavsky force-pushed the azaslavsky/backup/model_save branch from 0108471 to 5c32990 Compare August 30, 2023 23:19
@azaslavsky azaslavsky force-pushed the azaslavsky/backup/model_save branch from 5c32990 to db3c179 Compare August 30, 2023 23:23
@azaslavsky azaslavsky force-pushed the azaslavsky/backup/useremail_validation branch from c4a3284 to 298de54 Compare August 30, 2023 23:24
@azaslavsky azaslavsky force-pushed the azaslavsky/backup/model_save branch from db3c179 to 1dec885 Compare August 30, 2023 23:25
@azaslavsky azaslavsky removed the Scope: Frontend Automatically applied to PRs that change frontend components label Aug 30, 2023
@azaslavsky azaslavsky force-pushed the azaslavsky/backup/model_save branch from 1dec885 to 86a3356 Compare August 31, 2023 18:38
@azaslavsky azaslavsky force-pushed the azaslavsky/backup/useremail_validation branch from 298de54 to 12263f3 Compare August 31, 2023 18:38
@codecov
Copy link

codecov bot commented Aug 31, 2023

Codecov Report

Merging #55433 (2579869) into master (38f4955) will decrease coverage by 1.71%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master   #55433      +/-   ##
==========================================
- Coverage   80.14%   78.43%   -1.71%     
==========================================
  Files        5045     5045              
  Lines      216004   216016      +12     
  Branches    36542    36546       +4     
==========================================
- Hits       173108   169442    -3666     
- Misses      37612    41235    +3623     
- Partials     5284     5339      +55     
Files Changed Coverage
src/sentry/models/user.py ø
src/sentry/models/useremail.py 100.00%

@azaslavsky azaslavsky force-pushed the azaslavsky/backup/model_save branch from 86a3356 to 8bc676b Compare September 1, 2023 00:24
Base automatically changed from azaslavsky/backup/model_save to master September 1, 2023 00:55
The previous code assumed UserEmail collisions are possible. It is now
refactored to treat them all as unique, and always reset them from their
imported state for all `ImportScope`s except `Global`.

Issue: getsentry/team-ospo#181
@azaslavsky azaslavsky force-pushed the azaslavsky/backup/useremail_validation branch from 12263f3 to 2579869 Compare September 1, 2023 01:46
@azaslavsky azaslavsky marked this pull request as ready for review September 1, 2023 01:46
@azaslavsky azaslavsky requested a review from a team as a code owner September 1, 2023 01:46
@azaslavsky azaslavsky enabled auto-merge (squash) September 1, 2023 01:46
@azaslavsky azaslavsky merged commit d025b0d into master Sep 1, 2023
@azaslavsky azaslavsky deleted the azaslavsky/backup/useremail_validation branch September 1, 2023 02:17
EricHasegawa pushed a commit that referenced this pull request Sep 6, 2023
The previous code assumed UserEmail collisions are possible. It is now
refactored to treat them all as unique, and always reset them from their
imported state for all `ImportScope`s except `Global`.

Issue: getsentry/team-ospo#181
@github-actions github-actions bot locked and limited conversation to collaborators Sep 16, 2023
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.

2 participants