Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Fix guest -> real account upgrade with account validity enabled#6359

Merged
anoadragon453 merged 5 commits intodevelopfrom
anoa/upsert_validity
Nov 14, 2019
Merged

Fix guest -> real account upgrade with account validity enabled#6359
anoadragon453 merged 5 commits intodevelopfrom
anoa/upsert_validity

Conversation

@anoadragon453
Copy link
Copy Markdown
Member

When enabling account validity on sytest, I noticed the test "Guest user can upgrade to fully featured user" broke. This was due to this user being registered once as a guest, then again as a real user. This failed when account validity was enabled however, as inserting into the account_validity table sets user_id as a unique column, and we were trying to insert the same thing into two rows.

I've changed the insert to an upsert, which still makes sense and doesn't crash in this edge case.

@anoadragon453 anoadragon453 self-assigned this Nov 12, 2019
Copy link
Copy Markdown
Contributor

@babolivier babolivier left a comment

Choose a reason for hiding this comment

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

lgtm once CI passes

@anoadragon453
Copy link
Copy Markdown
Member Author

anoadragon453 commented Nov 13, 2019

Won't pass til develop is fixed :')

Edit: And fixed!

…ert_validity

* 'develop' of github.com:matrix-org/synapse:
  Blacklist PurgeRoomTestCase (#6361)
  Set room version default to 5
@anoadragon453 anoadragon453 merged commit 745a486 into develop Nov 14, 2019
@anoadragon453 anoadragon453 deleted the anoa/upsert_validity branch November 14, 2019 12:02
babolivier pushed a commit that referenced this pull request Sep 1, 2021
* commit '745a48625':
  Fix guest -> real account upgrade with account validity enabled (#6359)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants