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

Depublish a room from the public rooms list when it is upgraded #6232

Merged
merged 13 commits into from Nov 1, 2019

Conversation

@anoadragon453
Copy link
Member

anoadragon453 commented Oct 21, 2019

Fixes #4948

Remove a room from the public rooms list on a server when a user from that server joins the upgraded room, and when that user has permission to remove the listing in the old room.

Also fix an incorrect docstring.

TODO:

  • Remove the need for the user to have permission; we are the server so we should have power to do this
  • Consolidate duplicated code
@anoadragon453 anoadragon453 self-assigned this Oct 21, 2019
@anoadragon453 anoadragon453 added this to In progress in Homeserver Task Board via automation Oct 21, 2019
@anoadragon453 anoadragon453 requested a review from matrix-org/synapse-core Oct 22, 2019
@anoadragon453 anoadragon453 moved this from In progress to Review in Homeserver Task Board Oct 22, 2019
Copy link
Member

richvdh left a comment

I swear I reviewed this earlier

LGTM, though it now has conflicts :/

This prevents us from checking for an upgraded room every time a user on the homeserver joins a new room,
which is unnecessary. We only need to check once per room, instead of on every local join
@anoadragon453 anoadragon453 force-pushed the anoa/room_upgrade_depublishing branch from 656bbe4 to 3d5ca5a Oct 29, 2019
Rooms on remote servers were getting the old room depublished from the room directory,
but weren't getting new rooms auto-published to the room directory.
…m_upgrade_depublishing
@anoadragon453

This comment has been minimized.

Copy link
Member Author

anoadragon453 commented Oct 30, 2019

@richvdh This has changed quite a bit since your approval, so I'd like another review if possible.

I've changed the check to being on when a user joins a room the server already knows about and one they haven't, to only checking when a room is upgraded and upon your server seeing it for the first time.

Copy link
Member

richvdh left a comment

looks good, modulo a couple of nits

synapse/federation/federation_client.py Outdated Show resolved Hide resolved
synapse/handlers/federation.py Outdated Show resolved Hide resolved
synapse/handlers/room_member.py Show resolved Hide resolved
anoadragon453 and others added 2 commits Oct 31, 2019
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
@anoadragon453 anoadragon453 requested a review from richvdh Oct 31, 2019
@anoadragon453 anoadragon453 merged commit ace947e into develop Nov 1, 2019
20 checks passed
20 checks passed
buildkite/synapse Build #5317 passed (21 minutes, 46 seconds)
Details
buildkite/synapse/check-sample-config Passed (1 minute, 40 seconds)
Details
buildkite/synapse/check-style Passed (2 minutes, 3 seconds)
Details
buildkite/synapse/isort Passed (29 seconds)
Details
buildkite/synapse/mypy Passed (24 seconds)
Details
buildkite/synapse/newspaper-newsfile Passed (16 seconds)
Details
buildkite/synapse/packaging Passed (29 seconds)
Details
buildkite/synapse/pipeline Passed (4 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 (6 minutes, 42 seconds)
Details
buildkite/synapse/python-3-dot-5-slash-sqlite-slash-old-deps Passed (8 minutes, 53 seconds)
Details
buildkite/synapse/python-3-dot-6-slash-sqlite Passed (7 minutes, 16 seconds)
Details
buildkite/synapse/python-3-dot-7-slash-postgres-11 Passed (16 minutes, 58 seconds)
Details
buildkite/synapse/python-3-dot-7-slash-postgres-9-dot-5 Passed (17 minutes, 45 seconds)
Details
buildkite/synapse/python-3-dot-7-slash-sqlite Passed (7 minutes, 35 seconds)
Details
buildkite/synapse/synapse-port-db-slash-python-3-dot-5-slash-postgres-9-dot-5 Passed (2 minutes, 40 seconds)
Details
buildkite/synapse/synapse-port-db-slash-python-3-dot-7-slash-postgres-11 Passed (2 minutes, 22 seconds)
Details
buildkite/synapse/sytest-python-3-dot-5-slash-postgres-9-dot-6-slash-monolith Passed (15 minutes, 13 seconds)
Details
buildkite/synapse/sytest-python-3-dot-5-slash-postgres-9-dot-6-slash-workers Passed (15 minutes, 12 seconds)
Details
buildkite/synapse/sytest-python-3-dot-5-slash-sqlite-slash-monolith Passed (13 minutes, 26 seconds)
Details
Homeserver Task Board automation moved this from Review to Done Nov 1, 2019
@anoadragon453 anoadragon453 deleted the anoa/room_upgrade_depublishing branch Nov 1, 2019
anoadragon453 added a commit to matrix-org/sytest that referenced this pull request Nov 1, 2019
…upgrade (#729)

Synapse PR: matrix-org/synapse#6232
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.