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

CI run against Twisted trunk is failing #16289

Closed
github-actions bot opened this issue Sep 10, 2023 · 6 comments
Closed

CI run against Twisted trunk is failing #16289

github-actions bot opened this issue Sep 10, 2023 · 6 comments
Assignees
Labels
A-CI Issues related to CI on the Synapse repository O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

Comments

@github-actions
Copy link
Contributor

github-actions bot commented Sep 10, 2023

See https://github.com/matrix-org/synapse/actions/runs/6637463573

@clokep
Copy link
Member

clokep commented Sep 11, 2023

Looks like there some new typing errors:

synapse/util/file_consumer.py:82: error: Argument 1 to "run_in_background" has incompatible type "Callable[[IReactorFromThreads, ThreadPool, Callable[_P, _R], **_P], Deferred[_R]]"; expected "Callable[[IReactorFromThreads, ThreadPool, Callable[_P, _R], **_P], Awaitable[None]]"  [arg-type]
synapse/util/file_consumer.py:83: error: Argument 2 to "run_in_background" has incompatible type "ISynapseReactor"; expected "[IReactorFromThreads, ThreadPool, Callable[_P, _R], **_P.args]"  [arg-type]
synapse/util/file_consumer.py:84: error: Argument 3 to "run_in_background" has incompatible type "ThreadPool"; expected "[IReactorFromThreads, ThreadPool, Callable[_P, _R], **_P.args]"  [arg-type]
synapse/util/file_consumer.py:85: error: Argument 4 to "run_in_background" has incompatible type "Callable[[], None]"; expected "[IReactorFromThreads, ThreadPool, Callable[_P, _R], **_P.args]"  [arg-type]
tests/http/server/_base.py:338: error: Access to generic instance variables via class is ambiguous  [misc]
Found 5 errors in 2 files (checked 851 source files)

@clokep
Copy link
Member

clokep commented Sep 11, 2023

Seem to be due to twisted/twisted#11947 / deferToThreadPool getting types added.

@MatMaul MatMaul added S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience A-CI Issues related to CI on the Synapse repository labels Sep 14, 2023
@clokep
Copy link
Member

clokep commented Oct 19, 2023

This has gotten "worse":

synapse/util/file_consumer.py:82: error: Argument 1 to "run_in_background" has incompatible type "Callable[[IReactorFromThreads, ThreadPool, Callable[_P, _R], **_P], Deferred[_R]]"; expected "Callable[[IReactorFromThreads, ThreadPool, Callable[_P, _R], **_P], Awaitable[None]]"  [arg-type]
synapse/util/file_consumer.py:83: error: Argument 2 to "run_in_background" has incompatible type "ISynapseReactor"; expected "[IReactorFromThreads, ThreadPool, Callable[_P, _R], **_P.args]"  [arg-type]
synapse/util/file_consumer.py:84: error: Argument 3 to "run_in_background" has incompatible type "ThreadPool"; expected "[IReactorFromThreads, ThreadPool, Callable[_P, _R], **_P.args]"  [arg-type]
synapse/util/file_consumer.py:85: error: Argument 4 to "run_in_background" has incompatible type "Callable[[], None]"; expected "[IReactorFromThreads, ThreadPool, Callable[_P, _R], **_P.args]"  [arg-type]
tests/state/test_v2.py:679: error: Argument 2 to "assert_dict" of "TestCase" has incompatible type "Mapping[Tuple[str, str], str]"; expected "Dict[Any, Any]"  [arg-type]
tests/http/server/_base.py:338: error: Access to generic instance variables via class is ambiguous  [misc]
tests/handlers/test_appservice.py:163: error: Item "None" of "Optional[RoomAliasMapping]" has no attribute "room_id"  [union-attr]
tests/handlers/test_appservice.py:164: error: Item "None" of "Optional[RoomAliasMapping]" has no attribute "servers"  [union-attr]
tests/http/test_matrixfederationclient.py:86: error: Incompatible types in "yield" (actual type "Deferred[Dict[str, Any]]", expected type "Deferred[object]")  [misc]

Additionally, unit tests are now failing:

https://github.com/matrix-org/synapse/actions/runs/6571619244/job/17851137720

@clokep
Copy link
Member

clokep commented Oct 19, 2023

Additionally, unit tests are now failing:

matrix-org/synapse/actions/runs/6571619244/job/17851137720

This is due to twisted/twisted#11996.

@clokep
Copy link
Member

clokep commented Oct 19, 2023

I have the unit tests mostly sorted too.

@clokep
Copy link
Member

clokep commented Oct 25, 2023

This should be fixed; if not we'll handle it in the follow-up ticket.

@clokep clokep closed this as completed Oct 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-CI Issues related to CI on the Synapse repository O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Projects
None yet
Development

No branches or pull requests

2 participants