Closed clokep closed 12 months ago
This seems unhappy on Linux (GHA runners, anyway):
File "/home/runner/work/synapse/synapse/synapse/metrics/__init__.py", line 47, in <module>
import synapse.metrics._reactor_metrics # noqa: F401
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/synapse/synapse/synapse/metrics/_reactor_metrics.py", line 122, in <module>
wrapper = reactor._poller.poll = CallWrapper(reactor._poller.poll)
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'select.epoll' object attribute 'poll' is read-only
This seems unhappy on Linux (GHA runners, anyway):
I was unable to fully test on Linux locally, was waiting for builds to run.
Roger. Shout if you want a test minion to try anything out!
🤦 I fixed the epoll issue for asyncio, but not Twisted. Anyway...I think the current version will work?
It seems to work happily on jki.re FWIW
It seems to work happily on jki.re FWIW
With asyncio or just in general?
Sorry, that is using asyncio
I think this is a bit safer now and gives decent warnings like:
Skipping configuring ReactorLastSeenMetric: unexpected asyncio loop selector: <selectors.KqueueSelector object at 0x10de4ea50> via <_UnixSelectorEventLoop running=False closed=False debug=False>
or
Configuring ReactorLastSeenMetric failed: AttributeError("'select.kqueue' object attribute 'control' is read-only")
(the second one was by me introducing a bug intro the code)
Supports timing reactor ticks on
select
andpoll
reactors, as well asepoll
(which we previously supported). Also supports reactor timings when using theasyncio
reactor (when used with an underlyingselect
,poll
,epoll
,/dev/poll
, orkqueue
event loop).