Skip to content

Famedly release/v1.147.1#11

Open
FrenchGithubUser wants to merge 4 commits intomainfrom
famedly-release/v1.147.1
Open

Famedly release/v1.147.1#11
FrenchGithubUser wants to merge 4 commits intomainfrom
famedly-release/v1.147.1

Conversation

@FrenchGithubUser
Copy link
Member

No description provided.

MadLittleMods and others added 4 commits January 26, 2026 13:36
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
@FrenchGithubUser FrenchGithubUser requested a review from a team as a code owner February 18, 2026 09:45
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))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments