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

Implementation of HTTP 307 response for MSC3886 POST endpoint #14018

Merged
merged 30 commits into from
Oct 18, 2022

Conversation

hughns
Copy link
Member

@hughns hughns commented Oct 3, 2022

MSC3886: Simple client rendezvous capability

  • 307 Temporary Redirect - if the request should be served from somewhere else specified in the Location response header

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Pull request includes a sign off
  • Code style is correct
    (run the linters)

@hughns hughns marked this pull request as ready for review October 7, 2022 16:17
@hughns hughns requested a review from a team as a code owner October 7, 2022 16:17
@reivilibre reivilibre added the Z-Time-Tracked Element employees should track their time spent on this issue/PR. label Oct 10, 2022
@reivilibre reivilibre self-requested a review October 10, 2022 10:13
Copy link
Contributor

@reivilibre reivilibre left a comment

Choose a reason for hiding this comment

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

This looks like a reasonable 'implementation' of MSC3886 to me (though I'm not necessarily a fan of relying on the admin setting up another service for functionality, I understand this is potentially only a stand-in); minor remarks follow.
I note that there is an open comment on the MSC suggesting that to-device messages may make sense for this use case, but I'm happy to leave that as further discussion for the spec — I think it's still reasonable to land this even if it winds up getting superseded rather than stabilised later on.

changelog.d/14018.feature Outdated Show resolved Hide resolved
synapse/http/site.py Outdated Show resolved Hide resolved
synapse/config/server.py Show resolved Hide resolved
synapse/http/server.py Outdated Show resolved Hide resolved
synapse/http/server.py Outdated Show resolved Hide resolved
synapse/rest/client/rendezvous.py Show resolved Hide resolved
synapse/rest/client/rendezvous.py Show resolved Hide resolved
synapse/config/server.py Outdated Show resolved Hide resolved
hughns and others added 2 commits October 12, 2022 17:44
Co-authored-by: reivilibre <olivier@librepush.net>
@reivilibre reivilibre enabled auto-merge (squash) October 18, 2022 15:24
@reivilibre reivilibre merged commit 4eaf3eb into matrix-org:develop Oct 18, 2022
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Oct 29, 2022
Upstream changes:

Synapse 1.70.1 (2022-10-28)
===========================

(bugfixes)


Synapse 1.70.0 (2022-10-26)
===========================

Features
--------

- Support for
  [MSC3856](matrix-org/matrix-spec-proposals#3856):
  threads list
  API. ([\#13394](matrix-org/synapse#13394),
  [\#14171](matrix-org/synapse#14171),
  [\#14175](matrix-org/synapse#14175))

- Support for thread-specific notifications & receipts
  ([MSC3771](matrix-org/matrix-spec-proposals#3771)
  and
  [MSC3773](matrix-org/matrix-spec-proposals#3773)). ([\#13776](matrix-org/synapse#13776),
  [\#13824](matrix-org/synapse#13824),
  [\#13877](matrix-org/synapse#13877),
  [\#13878](matrix-org/synapse#13878),
  [\#14050](matrix-org/synapse#14050),
  [\#14140](matrix-org/synapse#14140),
  [\#14159](matrix-org/synapse#14159),
  [\#14163](matrix-org/synapse#14163),
  [\#14174](matrix-org/synapse#14174),
  [\#14222](matrix-org/synapse#14222))

- Stop fetching missing `prev_events` after we already know their
  signature is
  invalid. ([\#13816](matrix-org/synapse#13816))

- Send application service access tokens as a header (and query
  parameter). Implements
  [MSC2832](matrix-org/matrix-spec-proposals#2832). ([\#13996](matrix-org/synapse#13996))

- Ignore server ACL changes when generating pushes. Implements
  [MSC3786](matrix-org/matrix-spec-proposals#3786). ([\#13997](matrix-org/synapse#13997))

- Experimental support for redirecting to an implementation of a
  [MSC3886](matrix-org/matrix-spec-proposals#3886)
  HTTP rendezvous
  service. ([\#14018](matrix-org/synapse#14018))

- The `/relations` endpoint can now be used on
  workers. ([\#14028](matrix-org/synapse#14028))

- Advertise support for Matrix 1.3 and 1.4 on
  `/_matrix/client/versions`. ([\#14032](matrix-org/synapse#14032),
  [\#14184](matrix-org/synapse#14184))

- Improve validation of request bodies for the [Device
  Management](https://spec.matrix.org/v1.4/client-server-api/#device-management)
  and [MSC2697 Device
  Dehyrdation](matrix-org/matrix-spec-proposals#2697)
  client-server API
  endpoints. ([\#14054](matrix-org/synapse#14054))

- Experimental support for
  [MSC3874](matrix-org/matrix-spec-proposals#3874):
  Filtering threads from the `/messages`
  endpoint. ([\#14148](matrix-org/synapse#14148))

- Improve the validation of the following PUT endpoints:
  [`/directory/room/{roomAlias}`](https://spec.matrix.org/v1.4/client-server-api/#put_matrixclientv3directoryroomroomalias),
  [`/directory/list/room/{roomId}`](https://spec.matrix.org/v1.4/client-server-api/#put_matrixclientv3directorylistroomroomid)
  and
  [`/directory/list/appservice/{networkId}/{roomId}`](https://spec.matrix.org/v1.4/application-service-api/#put_matrixclientv3directorylistappservicenetworkidroomid). ([\#14179](matrix-org/synapse#14179))


Deprecations and Removals
-------------------------

- Remove the experimental implementation of
  [MSC3772](matrix-org/matrix-spec-proposals#3772). ([\#14094](matrix-org/synapse#14094))

- Remove the unstable identifier for
  [MSC3715](matrix-org/matrix-spec-proposals#3715). ([\#14106](matrix-org/synapse#14106),
  [\#14146](matrix-org/synapse#14146))
@hughns hughns deleted the hughns/msc3886-redirect branch February 24, 2023 16:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Z-Time-Tracked Element employees should track their time spent on this issue/PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants