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

Synapse's test suite doesn't cover workers #11111

Open
@babolivier

Description

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 #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.

Metadata

Assignees

No one assigned

    Labels

    A-TestingIssues related to testing in complement, synapse, etcA-WorkersProblems related to running Synapse in Worker Mode (or replication)T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions