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

Move tag/push rules room upgrade checking ealier #6155

Merged
merged 6 commits into from Oct 10, 2019

Conversation

@anoadragon453
Copy link
Member

anoadragon453 commented Oct 2, 2019

It turns out that _local_membership_update doesn't run when you join a new, remote room. It only runs if you're joining a room that your server already knows about. This would explain #4703 and #5295 and why the transfer would work in testing and some rooms, but not others. This would especially hit single-user homeservers.

The check has been moved to right after the room has been joined, and works much more reliably. (Though it may still be a bit awkward of a place).

@anoadragon453 anoadragon453 self-assigned this Oct 2, 2019
@anoadragon453 anoadragon453 added this to In progress in Homeserver Task Board via automation Oct 2, 2019
@anoadragon453 anoadragon453 requested a review from matrix-org/synapse-core Oct 2, 2019
@anoadragon453 anoadragon453 moved this from In progress to Review in Homeserver Task Board Oct 2, 2019
@anoadragon453 anoadragon453 removed the request for review from matrix-org/synapse-core Oct 2, 2019
@anoadragon453 anoadragon453 requested a review from matrix-org/synapse-core Oct 2, 2019
Copy link
Member

erikjohnston left a comment

Test?

synapse/handlers/room_member.py Outdated Show resolved Hide resolved
# Copy over user state if this is a join on an local upgraded room
yield self.copy_user_state_on_room_upgrade(
room_id, requester.user.to_string()
)

This comment has been minimized.

Copy link
@erikjohnston

erikjohnston Oct 8, 2019

Member

We only want to do this after join, so I think it should be back in _local_membership_update

This comment has been minimized.

Copy link
@anoadragon453

anoadragon453 Oct 8, 2019

Author Member

I've moved it to _local_membership_update. Do you think it should be inside _user_joined_room as well? My only concern is I'm not entirely sure where that method runs.

@anoadragon453

This comment has been minimized.

Copy link
Member Author

anoadragon453 commented Oct 8, 2019

Test?

Working on federated versions of the existing tests :)

Edit: matrix-org/sytest#721

@richvdh richvdh merged commit da815c1 into develop Oct 10, 2019
18 checks passed
18 checks passed
buildkite/synapse Build #4847 passed (32 minutes, 1 second)
Details
buildkite/synapse/check-sample-config Passed (1 minute, 28 seconds)
Details
buildkite/synapse/check-style Passed (3 minutes, 1 second)
Details
buildkite/synapse/isort Passed (15 seconds)
Details
buildkite/synapse/mypy Passed (26 seconds)
Details
buildkite/synapse/newspaper-newsfile Passed (15 seconds)
Details
buildkite/synapse/packaging Passed (16 seconds)
Details
buildkite/synapse/pipeline Passed (3 seconds)
Details
buildkite/synapse/python-3-dot-5-slash-postgres-9-dot-5 Passed (17 minutes, 44 seconds)
Details
buildkite/synapse/python-3-dot-5-slash-sqlite Passed (5 minutes, 18 seconds)
Details
buildkite/synapse/python-3-dot-5-slash-sqlite-slash-old-deps Passed (8 minutes, 16 seconds)
Details
buildkite/synapse/python-3-dot-6-slash-sqlite Passed (5 minutes, 54 seconds)
Details
buildkite/synapse/python-3-dot-7-slash-postgres-11 Passed (19 minutes, 19 seconds)
Details
buildkite/synapse/python-3-dot-7-slash-postgres-9-dot-5 Passed (17 minutes, 34 seconds)
Details
buildkite/synapse/python-3-dot-7-slash-sqlite Passed (5 minutes, 29 seconds)
Details
buildkite/synapse/sytest-python-3-dot-5-slash-postgres-9-dot-6-slash-monolith Passed (14 minutes, 50 seconds)
Details
buildkite/synapse/sytest-python-3-dot-5-slash-postgres-9-dot-6-slash-workers Passed (12 minutes, 14 seconds)
Details
buildkite/synapse/sytest-python-3-dot-5-slash-sqlite-slash-monolith Passed (11 minutes, 12 seconds)
Details
Homeserver Task Board automation moved this from Review to Done Oct 10, 2019
@richvdh richvdh deleted the anoa/fix_room_upgrade_tag_push_rules branch Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
3 participants
You can’t perform that action at this time.