Support MSC3916 by adding a federation /download endpoint#17172
Conversation
…classes when fetching media for federation download
|
Does this require more tests? If so, what should be tested? |
|
complement run failing with |
I think that error is a red herring. In the Synapse logs, I'm seeing the following exception: The error about conflicting containers is certainly unhelpful though... |
|
Weird! If it's an attribute error why did only one of the three complement tests fail? Don't they use the same image? I'm gonna dig deeper but I'm surprised... Edit: looks like this was due to workers trying to instantiate the federation download servlet (which relies on the media repo) when the media repo has been disabled via config. I wondered why this wasn't picked up by the Sytest worker runs but I suspect that it is due to the fact that sytest doesn't appear to use the |
anoadragon453
left a comment
There was a problem hiding this comment.
A fantastic start - a few questions below. In addition, this functionality should be gated before an experimental config option.
anoadragon453
left a comment
There was a problem hiding this comment.
Nearly there! Just a few small things now.
|
It seems very unlikely to me that the sytest failure is a result of the last round of changes as I only added a test, newlines, and a comment... |
anoadragon453
left a comment
There was a problem hiding this comment.
It seems very unlikely to me that the sytest failure is a result of the last round of changes as I only added a test, newlines, and a comment...
Looks like a flake. I've re-ran the tests.
#17213) [MSC3916](https://github.com/matrix-org/matrix-spec-proposals/blob/rav/authentication-for-media/proposals/3916-authentication-for-media.md) adds new media endpoints under `_matrix/client`. This PR adds the `/preview_url`, `/config`, and `/thumbnail` endpoints. `/download` will be added in a follow-up PR once the work for the federation `/download` endpoint is complete (see #17172). Should be reviewable commit-by-commit.
element-hq#17213) [MSC3916](https://github.com/matrix-org/matrix-spec-proposals/blob/rav/authentication-for-media/proposals/3916-authentication-for-media.md) adds new media endpoints under `_matrix/client`. This PR adds the `/preview_url`, `/config`, and `/thumbnail` endpoints. `/download` will be added in a follow-up PR once the work for the federation `/download` endpoint is complete (see element-hq#17172). Should be reviewable commit-by-commit.
|
Updated to reflect that new version of MSC removes |
anoadragon453
left a comment
There was a problem hiding this comment.
This looks pretty solid to me! A couple tiny notes, and then I think this is good to go.
element-hq#17213) [MSC3916](https://github.com/matrix-org/matrix-spec-proposals/blob/rav/authentication-for-media/proposals/3916-authentication-for-media.md) adds new media endpoints under `_matrix/client`. This PR adds the `/preview_url`, `/config`, and `/thumbnail` endpoints. `/download` will be added in a follow-up PR once the work for the federation `/download` endpoint is complete (see element-hq#17172). Should be reviewable commit-by-commit.
MSC3916 outlines the addition of a new federation endpoint to serve media downloads to other servers. This PR implements that endpoint and the new
multipart/mixedresponse format that it returns. Future PRs will implement the rest of MSC3916, including altering the new client-server/downloadendpoint to use the new federation endpoint for remote download requests.Should be reviewable commit-by-commit