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

Closed
github-actions bot opened this issue Feb 19, 2023 · 8 comments · Fixed by #16121
Closed

CI run against Twisted trunk is failing #15097

github-actions bot opened this issue Feb 19, 2023 · 8 comments · Fixed by #16121
Labels
A-CI Issues related to CI on the Synapse repository A-Testing Issues related to testing in complement, synapse, etc T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

Comments

@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2023

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

@DMRobertson
Copy link
Contributor

synapse/util/manhole.py:101: error: Argument 1 to "Portal" has incompatible type "TerminalRealm"; expected "IRealm"  [arg-type]

@DMRobertson DMRobertson added the T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. label Mar 13, 2023
@MadLittleMods MadLittleMods added A-Testing Issues related to testing in complement, synapse, etc A-CI Issues related to CI on the Synapse repository labels Apr 25, 2023
@MadLittleMods MadLittleMods changed the title CI run against Twisted trunk is failing CI run against Twisted trunk is failing: "Portal" has incompatible type "TerminalRealm"; expected "IRealm" Apr 25, 2023
@DMRobertson
Copy link
Contributor

I think renaming this has caused the github action to open #15490 rather than edit this issue.

@DMRobertson DMRobertson changed the title CI run against Twisted trunk is failing: "Portal" has incompatible type "TerminalRealm"; expected "IRealm" CI run against Twisted trunk is failing Apr 26, 2023
@DMRobertson
Copy link
Contributor

twisted/twisted#11813 is a PR to twisted that should fix this, currently awaiting another round of review.

@DMRobertson
Copy link
Contributor

If that doesn't land upstream I guess we can cast() it ourselves.

@clokep
Copy link
Member

clokep commented Jul 10, 2023

This seems to now be failing with:

Invalid git url "git+https://github.com/twisted/twisted.git#"

@DMRobertson
Copy link
Contributor

This seems to now be failing with:

Invalid git url "git+https://github.com/twisted/twisted.git#"

I would guess this is a screwup of mine here:

poetry add --extras tls git+https://github.com/twisted/twisted.git#${{ inputs.twisted_ref }}

see #15302

@DMRobertson
Copy link
Contributor

It seems that the input I added in #15302 is only processed when the workflow is run due to a workflow_dispatch event, i.e. by one of us triggering it manually in the GitHub web UI.

Instead, inputs seem evaluate to null in the github actions language and one has to use || default_val to work around this. (See e.g. https://evanhalley.dev/post/github-actions-workflow-with-inputs/)

@DMRobertson
Copy link
Contributor

Now failing linter with:

synapse/logging/context.py:846: error: Argument 1 to "addBoth" of "Deferred" has incompatible type "Callable[[ResultT, LoggingContext], ResultT]"; expected "Callable[[Union[R, Failure], LoggingContext], Failure]"  [arg-type]
synapse/logging/context.py:846: note: This is likely because "_set_context_cb" has named arguments: "result". Consider marking them positional-only
synapse/logging/context.py:846: error: Argument 2 to "addBoth" of "Deferred" has incompatible type "Union[LoggingContext, _Sentinel]"; expected "LoggingContext"  [arg-type]
synapse/logging/context.py:873: error: Argument 1 to "addBoth" of "Deferred" has incompatible type "Callable[[ResultT, LoggingContext], ResultT]"; expected "Callable[[Union[T, Failure], LoggingContext], Failure]"  [arg-type]
synapse/logging/context.py:873: note: This is likely because "_set_context_cb" has named arguments: "result". Consider marking them positional-only
synapse/logging/context.py:873: error: Argument 2 to "addBoth" of "Deferred" has incompatible type "Union[LoggingContext, _Sentinel]"; expected "LoggingContext"  [arg-type]
synapse/util/caches/deferred_cache.py:473: error: Argument 1 to "addCallback" of "Deferred" has incompatible type "Callable[[Dict[KT, VT]], Optional[VT]]"; expected "Callable[[Dict[KT, VT]], Failure]"  [arg-type]
synapse/util/caches/deferred_cache.py:473: error: Incompatible return value type (got "Optional[VT]", expected "Failure")  [return-value]
synapse/handlers/initial_sync.py:203: error: Argument 1 to "addCallback" of "Deferred" has incompatible type "Callable[[Dict[str, Mapping[Tuple[str, str], EventBase]]], Mapping[Tuple[str, str], EventBase]]"; expected "Callable[[Dict[str, Mapping[Tuple[str, str], EventBase]]], Failure]"  [arg-type]
synapse/handlers/initial_sync.py:203: error: Redundant cast to "Mapping[Tuple[str, str], EventBase]"  [redundant-cast]
synapse/handlers/initial_sync.py:203: error: Incompatible return value type (got "Mapping[Tuple[str, str], EventBase]", expected "Failure")  [return-value]
synapse/handlers/message.py:1478: error: Need more than 0 values to unpack (2 expected)  [misc]
synapse/handlers/message.py:1480: error: Argument 1 to "gather_results" has incompatible type "Tuple[Deferred[EventBase], Deferred[Optional[Failure]]]"; expected "Tuple[]"  [arg-type]
synapse/handlers/message.py:1496: error: Cannot determine type of "result"  [has-type]
tests/util/test_async_helpers.py:71: error: Argument 1 to "addCallback" of "Deferred" has incompatible type "Callable[[ObservableDeferred[int], int], ObservableDeferred[int]]"; expected "Callable[[int, int], Failure]"  [arg-type]
tests/util/test_async_helpers.py:71: note: This is likely because "check_val" has named arguments: "res". Consider marking them positional-only
tests/util/test_async_helpers.py:72: error: Argument 1 to "addCallback" of "Deferred" has incompatible type "Callable[[ObservableDeferred[int], int], ObservableDeferred[int]]"; expected "Callable[[int, int], Failure]"  [arg-type]
tests/util/test_async_helpers.py:72: note: This is likely because "check_val" has named arguments: "res". Consider marking them positional-only
tests/util/test_async_helpers.py:102: error: Argument 1 to "addErrback" of "Deferred" has incompatible type "Callable[[ObservableDeferred[str], int], None]"; expected "Callable[[Failure, int], Deferred[<nothing>]]"  [arg-type]
tests/util/test_async_helpers.py:102: note: This is likely because "check_val" has named arguments: "res". Consider marking them positional-only
tests/util/test_async_helpers.py:103: error: Argument 1 to "addErrback" of "Deferred" has incompatible type "Callable[[ObservableDeferred[str], int], None]"; expected "Callable[[Failure, int], Deferred[<nothing>]]"  [arg-type]
tests/util/test_async_helpers.py:103: note: This is likely because "check_val" has named arguments: "res". Consider marking them positional-only

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 A-Testing Issues related to testing in complement, synapse, etc T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants