Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI run against Twisted trunk is failing #17075

Closed
github-actions bot opened this issue Apr 12, 2024 · 8 comments
Closed

CI run against Twisted trunk is failing #17075

github-actions bot opened this issue Apr 12, 2024 · 8 comments

Comments

@github-actions
Copy link
Contributor

github-actions bot commented Apr 12, 2024

See https://github.com/element-hq/synapse/actions/runs/12368825338

@anoadragon453
Copy link
Member

The errors:

mypy:

synapse/http/proxy.py:92: error: "Headers" has no attribute "_canonicalNameCaps"  [attr-defined]

unit tests:

Error: 
Traceback (most recent call last):
  File "/home/runner/work/synapse/synapse/tests/test_server.py", line 419, in test_redirect_exception_with_cookie
    location_headers = [v for k, v in headers if k == b"Location"]
builtins.TypeError: 'Headers' object is not iterable

tests.test_server.WrapHtmlRequestHandlerTests.test_redirect_exception_with_cookie
===============================================================================
Error: 
Traceback (most recent call last):
  File "/home/runner/work/synapse/synapse/tests/test_server.py", line 396, in test_redirect_exception
    location_headers = [v for k, v in headers if k == b"Location"]
builtins.TypeError: 'Headers' object is not iterable

tests.test_server.WrapHtmlRequestHandlerTests.test_redirect_exception

@arkamar
Copy link
Contributor

arkamar commented Jul 4, 2024

I have bisected the twisted. The "Headers" has no attribute "_canonicalNameCaps" issue was introduced in PR twisted/twisted#12117 and the builtins.TypeError: 'Headers' object is not iterable issue was introduced in PR twisted/twisted#12157

@mgorny
Copy link

mgorny commented Oct 20, 2024

This was now released as 24.10.0rc1, and therefore will hit a stable release real soon.

gentoo-bot pushed a commit to gentoo/gentoo that referenced this issue Oct 20, 2024
@tgurr
Copy link

tgurr commented Oct 28, 2024

Just hit the error with the now released version 24.10.0 https://pypi.org/project/Twisted/24.10.0/ that synapse won't work anymore after upgrading to that version.

@gramakri
Copy link

Related: #17882

@anoadragon453
Copy link
Member

Thanks all. The team is aware and actively working on a fix for the next Synapse release 🙂

@arkamar
Copy link
Contributor

arkamar commented Nov 14, 2024

For the record, one test fails in 1.119.0 with Twisted 24.10.0

===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/twisted/logger/_observer.py", line 81, in __call__
    observer(event)
  File "/usr/lib/python3.13/site-packages/twisted/logger/_legacy.py", line 90, in __call__
    self.legacyObserver(event)
  File "/usr/lib/python3.13/site-packages/twisted/trial/_dist/workertrial.py", line 44, in emit
    self.protocol.callRemote(managercommands.TestWrite, out=text)
  File "/usr/lib/python3.13/site-packages/twisted/protocols/amp.py", line 951, in callRemote
    return co._doCommand(self)
  File "/usr/lib/python3.13/site-packages/twisted/protocols/amp.py", line 1973, in _doCommand
    d = proto._sendBoxCommand(
  File "/usr/lib/python3.13/site-packages/twisted/protocols/amp.py", line 884, in _sendBoxCommand
    box._sendTo(self.boxSender)
  File "/usr/lib/python3.13/site-packages/twisted/protocols/amp.py", line 713, in _sendTo
    proto.sendBox(self)
  File "/usr/lib/python3.13/site-packages/twisted/protocols/amp.py", line 2358, in sendBox
    self.transport.write(box.serialize())
  File "/usr/lib/python3.13/site-packages/twisted/protocols/amp.py", line 692, in serialize
    raise TooLong(False, True, v, k)
twisted.protocols.amp.TooLong:

tests.storage.databases.main.test_events_worker.DatabaseOutageTestCase.test_recovery
-------------------------------------------------------------------------------
Ran 3885 tests in 146.810s

FAILED (skips=294, errors=1, successes=3590)

The same error is detected here https://github.com/element-hq/synapse/actions/runs/11801798008/job/32876109329?pr=17878

anoadragon453 added a commit that referenced this issue Dec 18, 2024
Fixes various `mypy` errors associated with Twisted `24.11.0`.

Hopefully addresses #17075,
though I've yet to test against `trunk`.

Changes should be compatible with our currently pinned Twisted version
of `24.7.0`.
@anoadragon453
Copy link
Member

anoadragon453 commented Dec 18, 2024

Based on local testing, this should have been fixed by #17998

➜ pip install -U git+https://github.com/twisted/twisted.git#trunk
[...snip...]
      Successfully uninstalled Twisted-24.7.0
Successfully installed Twisted-24.11.0.post0 automat-24.8.1

➜ mypy
Success: no issues found in 916 source files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants