Open
Conversation
Now you can run tests individually: ``` COMPLEMENT_DIR=../complement ./scripts-dev/complement.sh ./tests/csapi -run TestAsyncUpload/Cannot_upload_to_a_media_ID_that_has_already_been_uploaded_to ``` This refactor is spawning from matrix-org#839 where I wanted to specifically run the flaky test.
…atrix-org#839) As a general rule, we should not be asserting the language of human `error` messages. They can change at any time, localized, etc. This is spawning from a real life flaky failure I'm seeing when testing with the workers variant of Synapse: ```shell $ WORKERS=1 COMPLEMENT_DIR=../complement ./scripts-dev/complement.sh ./tests/csapi -run TestAsyncUpload/Cannot_upload_to_a_media_ID_that_has_already_been_uploaded_to ... === NAME TestAsyncUpload/Cannot_upload_to_a_media_ID_that_has_already_been_uploaded_to media_async_uploads_test.go:68: MatchResponse key 'error' got 'Media ID cannot be overwritten' (type string) want 'Media ID already has content' (type string) - http://127.0.0.1:33651/_matrix/media/v3/upload/hs1/GjRDDFucigeiLQtzNbjADIoI => {"errcode":"M_CANNOT_OVERWRITE_MEDIA","error":"Media ID cannot be overwritten"} 2026/01/22 17:05:44 ============================================ --- FAIL: TestAsyncUpload (14.13s) --- FAIL: TestAsyncUpload/Cannot_upload_to_a_media_ID_that_has_already_been_uploaded_to (0.07s) FAIL FAIL github.com/matrix-org/complement/tests/csapi 16.063s FAIL ``` I also see this test listed in the known flakes we track with Synapse: element-hq/synapse#18537 This problem happens because there are two possible error messages in Synapse which we could encounter for `M_CANNOT_OVERWRITE_MEDIA`: - [`"Media ID already has content"`](https://github.com/element-hq/synapse/blob/826a7dd29aea7041fb25b98d360da4dbedf22712/synapse/media/media_repository.py#L304-L308) - [`"Media ID cannot be overwritten"`](https://github.com/element-hq/synapse/blob/826a7dd29aea7041fb25b98d360da4dbedf22712/synapse/rest/media/upload_resource.py#L159-L163)
* Allow Complement to create v12 rooms Previously we always relied on the HS under test creating v12 rooms, and Complement could only join/send into those rooms. This is a problem if we want to build room versions on top of v12 rooms, as we need Complement to be able to create v12 rooms too. * Remove v12 shims as it's native now * Set unsigned field correctly * Add entropy * Review comments
itsoyou
approved these changes
Feb 18, 2026
github-merge-queue bot
pushed a commit
to famedly/synapse
that referenced
this pull request
Feb 18, 2026
# Famedly Synapse Release v1.147.1_1 depends on: famedly/complement#11 ## Famedly additions for v1.146.0_1 None ### Notes for Famedly: - Disallow requests to the health endpoint from containing trailing path characters. ([\#19405](element-hq/synapse#19405)) - Block federation requests and events authenticated using a known insecure signing key. See [CVE-2026-24044](https://www.cve.org/CVERecord?id=CVE-2026-24044) / [ELEMENTSEC-2025-1670](GHSA-qwcj-h6m8-vp6q). ([\#19459](element-hq/synapse#19459))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.