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 guest -> real account upgrade with account validity enabled #6359

Merged
merged 5 commits into from Nov 14, 2019

Conversation

@anoadragon453
Copy link
Member

anoadragon453 commented Nov 12, 2019

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
@anoadragon453 anoadragon453 added this to In progress in Homeserver Task Board via automation Nov 12, 2019
Copy link
Member

babolivier left a comment

lgtm once CI passes

@anoadragon453

This comment has been minimized.

Copy link
Member Author

anoadragon453 commented Nov 13, 2019

Won't pass til develop is fixed :')

Edit: And fixed!

@anoadragon453 anoadragon453 moved this from In progress to Review in Homeserver Task Board Nov 14, 2019
…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
20 checks passed
20 checks passed
buildkite/synapse Build #5518 passed (39 minutes, 10 seconds)
Details
buildkite/synapse/check-sample-config Passed (1 minute, 35 seconds)
Details
buildkite/synapse/check-style Passed (1 minute, 36 seconds)
Details
buildkite/synapse/isort Passed (44 seconds)
Details
buildkite/synapse/mypy Passed (53 seconds)
Details
buildkite/synapse/newspaper-newsfile Passed (16 seconds)
Details
buildkite/synapse/packaging Passed (45 seconds)
Details
buildkite/synapse/pipeline Passed (3 seconds)
Details
buildkite/synapse/python-3-dot-5-slash-postgres-9-dot-5 Passed (18 minutes, 23 seconds)
Details
buildkite/synapse/python-3-dot-5-slash-sqlite Passed (7 minutes, 44 seconds)
Details
buildkite/synapse/python-3-dot-5-slash-sqlite-slash-old-deps Passed (20 minutes, 54 seconds)
Details
buildkite/synapse/python-3-dot-6-slash-sqlite Passed (7 minutes, 59 seconds)
Details
buildkite/synapse/python-3-dot-7-slash-postgres-11 Passed (18 minutes, 53 seconds)
Details
buildkite/synapse/python-3-dot-7-slash-postgres-9-dot-5 Passed (17 minutes, 32 seconds)
Details
buildkite/synapse/python-3-dot-7-slash-sqlite Passed (7 minutes, 23 seconds)
Details
buildkite/synapse/synapse-port-db-slash-python-3-dot-5-slash-postgres-9-dot-5 Passed (1 minute, 40 seconds)
Details
buildkite/synapse/synapse-port-db-slash-python-3-dot-7-slash-postgres-11 Passed (1 minute, 49 seconds)
Details
buildkite/synapse/sytest-python-3-dot-5-slash-postgres-9-dot-6-slash-monolith Passed (18 minutes, 24 seconds)
Details
buildkite/synapse/sytest-python-3-dot-5-slash-postgres-9-dot-6-slash-workers Passed (15 minutes, 31 seconds)
Details
buildkite/synapse/sytest-python-3-dot-5-slash-sqlite-slash-monolith Passed (15 minutes, 55 seconds)
Details
Homeserver Task Board automation moved this from Review to Done Nov 14, 2019
@anoadragon453 anoadragon453 deleted the anoa/upsert_validity branch Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
2 participants
You can’t perform that action at this time.