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

Asynchronous Uploads #15503

Merged
merged 29 commits into from
Nov 15, 2023
Merged

Asynchronous Uploads #15503

merged 29 commits into from
Nov 15, 2023

Conversation

sumnerevans
Copy link
Contributor

@sumnerevans sumnerevans commented Apr 28, 2023

Implements the recently merged MSC2246 Asynchronous Uploads for Synapse's media repository.

Closes #12484

  • Configuration options rate limiting media creation
  • Configuration options for how long to wait until media IDs expire
  • POST /_matrix/media/v1/create
  • PUT /_matrix/media/v3/upload/{serverName}/{mediaId}
  • timeout_ms support on /download
  • timeout_ms support on /thumbnail
  • Option to restrict how many open media uploads a given user can have.

Signed-off-by: Sumner Evans sumner@beeper.com


Keywords: async

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)

@clokep
Copy link
Member

clokep commented May 1, 2023

@sumnerevans I'm going to remove the review request from this since you marked it as a draft; if you are still looking for a review please shout about what bits you're looking for a review of (or why it is in draft but you want a review). Thanks! 👍

@clokep clokep removed the request for review from a team May 1, 2023 15:20
@sumnerevans
Copy link
Contributor Author

@clokep I accidentally opened as a non-draft PR. And then the automatic reviewer adder functionality kicked in and I could not remove it. Sorry about that!

@clokep
Copy link
Member

clokep commented May 1, 2023

Not an issue! If it doesn't kick in when un-drafting the PR just shout! 👍

@sumnerevans
Copy link
Contributor Author

Blocked by matrix-org/complement#638

Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
@github-actions github-actions bot deployed to PR Documentation Preview November 13, 2023 19:32 Active
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
@github-actions github-actions bot deployed to PR Documentation Preview November 13, 2023 19:34 Active
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
@github-actions github-actions bot deployed to PR Documentation Preview November 13, 2023 19:39 Active
@clokep
Copy link
Member

clokep commented Nov 13, 2023

With the last comment and updating the complement tests this is all passing for me locally again! 👍

I'm pretty certain it is good to merge.

Signed-off-by: Sumner Evans <me@sumnerevans.com>
Signed-off-by: Sumner Evans <me@sumnerevans.com>
Signed-off-by: Sumner Evans <me@sumnerevans.com>
@github-actions github-actions bot deployed to PR Documentation Preview November 14, 2023 17:03 Active
Signed-off-by: Sumner Evans <me@sumnerevans.com>
@clokep
Copy link
Member

clokep commented Nov 14, 2023

Kicked off a new round of complement tests: https://github.com/matrix-org/synapse/actions/runs/6867273574

Copy link
Member

@clokep clokep left a comment

Choose a reason for hiding this comment

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

Should be good if the test run works. 🎉

@github-actions github-actions bot deployed to PR Documentation Preview November 15, 2023 13:24 Active
@github-actions github-actions bot deployed to PR Documentation Preview November 15, 2023 13:26 Active
@clokep
Copy link
Member

clokep commented Nov 15, 2023

Complement with workers was failing, hopefully the latest change fixes it: https://github.com/matrix-org/synapse/actions/runs/6877944714

@clokep
Copy link
Member

clokep commented Nov 15, 2023

Tests passed minus a known flake (matrix-org/sytest#1201). 🎉 Thanks for working through this with me! 🚀

@clokep clokep merged commit 999bd77 into matrix-org:develop Nov 15, 2023
75 of 81 checks passed
@sumnerevans sumnerevans deleted the async-uploads branch November 15, 2023 14:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Media-Repository Uploading, downloading images and video, thumbnailing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants