-
Notifications
You must be signed in to change notification settings - Fork 220
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
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A fantastic start - a few questions below. In addition, this functionality should be gated before an experimental config option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/mixed
response format that it returns. Future PRs will implement the rest of MSC3916, including altering the new client-server/download
endpoint to use the new federation endpoint for remote download requests.Should be reviewable commit-by-commit