You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when using kr8s.objects.Pod().portforward to reach PostgreSQL with psycopg, we are getting the following at the end of a successful communication with the PostgreSQL server:
Unhandled exception in client_connected_cb
transport: <_SelectorSocketTransport closed fd=11>
+ Exception Group Traceback (most recent call last):
| File "/app/lib/python3.13/site-packages/kr8s/_portforward.py", line 238, in _sync_sockets
| with suppress(ConnectionClosedError, httpx_ws.WebSocketDisconnect):
| ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "/usr/local/lib/python3.13/contextlib.py", line 468, in __exit__
| raise rest
| File "/app/lib/python3.13/site-packages/kr8s/_portforward.py", line 239, in _sync_sockets
| async with anyio.create_task_group() as tg:
| ~~~~~~~~~~~~~~~~~~~~~~~^^
| File "/app/lib/python3.13/site-packages/anyio/_backends/_asyncio.py", line 815, in __aexit__
| raise BaseExceptionGroup(
| "unhandled errors in a TaskGroup", self._exceptions
| )
| ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
+-+---------------- 1 ----------------
| Traceback (most recent call last):
| File "/app/lib/python3.13/site-packages/kr8s/_portforward.py", line 247, in _tcp_to_ws
| data = await reader.read(1024 * 1024)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "/usr/local/lib/python3.13/asyncio/streams.py", line 730, in read
| await self._wait_for_data('read')
| File "/usr/local/lib/python3.13/asyncio/streams.py", line 539, in _wait_for_data
| await self._waiter
| File "/usr/local/lib/python3.13/asyncio/selector_events.py", line 1005, in _read_ready__data_received
| data = self._sock.recv(self.max_size)
| ConnectionResetError: [Errno 104] Connection reset by peer
+------------------------------------
Which project are you reporting a bug for?
kr8s
What happened?
Hello,
when using
kr8s.objects.Pod().portforward
to reach PostgreSQL with psycopg, we are getting the following at the end of a successful communication with the PostgreSQL server:Should
ConnectionResetError
be added to the exceptions @ https://github.com/kr8s-org/kr8s/blob/v0.18.1/kr8s/_portforward.py#L238 or handled for https://github.com/kr8s-org/kr8s/blob/v0.18.1/kr8s/_portforward.py#L247 like it is present for sending @ https://github.com/kr8s-org/kr8s/blob/v0.18.1/kr8s/_portforward.py#L255 ?Anything else?
No response
The text was updated successfully, but these errors were encountered: