element-hq / element-hq/synapse

Synapse's test suite doesn't cover workers

Open
#11,111 0 comments 0 reactions 0 assignees View on GitHub
A-Testing A-Workers T-Task
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#11111](https://github.com/matrix-org/synapse/issues/11111).

---

The reason for the 20min outage on matrix.org on Friday is because a module we use started using the new module API method introduced in https://github.com/matrix-org/synapse/pull/10833. This method calls to the `get_user_ip_and_agents` store method, which doesn't exist on a worker store, thus modules can't call it if they run on a worker (and matrix.org uses workers).

This PR included a test to make sure the new method works well. AFAICT, this is supposed to be the right thing to do when introducing a new Synapse-specific feature (i.e. a feature that's not part of the Matrix spec, which should be tested in SyTest/Complement as well).

However, this test suite isn't run in a worker configuration. This means our CI didn't detect the bug despite having a test for it - and it also means that possibly quite a few other features that are Synapse-specific are buggy on workers.

So I think we have an issue with our test suite not being tested against workers (apart for a few tests that are specifically written for workers, to test replication etc). I'm not sure what the first step in fixing this should look like; maybe one could have a look at how difficult it would be to run them on a mock worker rather than a mock homeserver.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.