-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Allow enabling the asyncio reactor in complement #14099
Allow enabling the asyncio reactor in complement #14099
Conversation
Concerned that having 3 more Complement runs per CI job is going to make our problem of running out of CI workers even worse. But I understand the intention and we don't like running things that aren't tested in CI. What's your intention here? Are you going to be relying on the asyncio reactor soon due to a code change? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed in #synapse-dev and decided that we'd probably prefer to make this a nightly, or a develop-only, run.
We also note that Erik has been running the asyncio reactor on his homeserver and it hasn't seemed to explode. I will add to that and say I have been running my homeserver with the asyncio reactor + uvloop's asyncio event loop since Monday and have not had any trouble yet.
For a develop-only CI run, you might be interested in waiting for https://github.com/matrix-org/synapse/pull/14153/files#diff-98ea8896abc68eceb35d39a84a9b43975323a3552b8be404cc53fcbce94eb38aR138 — that would give you the ability to write some Python akin to |
As noted here, the forking launcher fails with this change.
Looks like we need to install the asyncio reactor here synapse/synapse/app/complement_fork_starter.py Lines 103 to 123 in d6b85a2
and somehow not install the asyncioreactor here?? Lines 31 to 47 in dc37b68
|
@DMRobertson I think I found a proper solution: It installs the asyncioreactor before loading the rest, and unsets the environment variable, so |
This didn't work out. To see the problem:
I don't know how the import order is determined, but Python is importing the top-level synapse` module (hence installing the asyncio reactor) before it imports the complement_fork_starter. Perhaps you could pass a |
Superseded by #14858 |
This allows enabling the asyncio reactor by setting the
ASYNCIO_REACTOR=1
environment variable.It also adds jobs to the CI to run those in CI.