Skip to content

ConnectTimeout in _get_file_from_patch() #5905

@suhaibmujahid

Description

@suhaibmujahid
Exception: ConnectTimeout('')Traceback (most recent call last):
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 101, in map_httpcore_exceptions yield
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 394, in handle_async_request resp = await self._pool.handle_async_request(req)
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/httpcore/_async/connection_pool.py", line 256, in handle_async_request raise exc from None
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/httpcore/_async/connection_pool.py", line 236, in handle_async_request response = await connection.handle_async_request(
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/httpcore/_async/connection.py", line 101, in handle_async_request raise exc
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/httpcore/_async/connection.py", line 78, in handle_async_request stream = await self._connect(request)
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/httpcore/_async/connection.py", line 124, in _connect stream = await self._network_backend.connect_tcp(**kwargs)
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/httpcore/_backends/auto.py", line 31, in connect_tcp return await self._backend.connect_tcp(
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/httpcore/_backends/anyio.py", line 113, in connect_tcp with map_exceptions(exc_map):
 File "/Users/smujahid/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/lib/python3.12/contextlib.py", line 158, in __exit__ self.gen.throw(value)
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions raise to_exc(exc) from exc httpcore.ConnectTimeout The above exception was the direct cause of the following exception: Traceback (most recent call last):
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/langgraph/_internal/_runnable.py", line 705, in ainvoke input = await asyncio.create_task(
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/langgraph/_internal/_runnable.py", line 473, in ainvoke ret = await self.afunc(*args, **kwargs)
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/langgraph/prebuilt/tool_node.py", line 749, in _afunc outputs = await asyncio.gather(*coros)
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/langgraph/prebuilt/tool_node.py", line 1088, in _arun_one return await self._execute_tool_async(tool_request, input_type, config)
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/langgraph/prebuilt/tool_node.py", line 1037, in _execute_tool_async content = _handle_tool_error(e, flag=self._handle_tool_errors)
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/langgraph/prebuilt/tool_node.py", line 401, in _handle_tool_error content = flag(e) # type: ignore [assignment, call-arg]
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/langgraph/prebuilt/tool_node.py", line 358, in _default_handle_tool_errors raise e
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/langgraph/prebuilt/tool_node.py", line 990, in _execute_tool_async response = await tool.ainvoke(call_args, config)
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/langchain_core/tools/structured.py", line 66, in ainvoke return await super().ainvoke(input, config, **kwargs)
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/langchain_core/tools/base.py", line 634, in ainvoke return await self.arun(tool_input, **kwargs)
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/langchain_core/tools/base.py", line 1081, in arun raise error_to_raise
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/langchain_core/tools/base.py", line 1047, in arun response = await coro_with_context(coro, context)
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/langchain_core/tools/structured.py", line 120, in _arun return await self.coroutine(*args, **kwargs)
 File "/Users/smujahid/repos/mozilla/bugbug/bugbug/tools/code_review/langchain_tools.py", line 45, in expand_context file_content = await runtime.context.patch.get_new_file(file_path)
 File "/Users/smujahid/repos/mozilla/bugbug/bugbug/tools/core/platforms/phabricator.py", line 368, in get_new_file return await self._get_file(file_path, is_before_patch=False)
 File "/Users/smujahid/repos/mozilla/bugbug/bugbug/tools/core/platforms/phabricator.py", line 356, in _get_file return await self._get_file_from_patch(
 File "/Users/smujahid/repos/mozilla/bugbug/bugbug/tools/core/platforms/phabricator.py", line 330, in _get_file_from_patch r = await client.get(
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1768, in get return await self.request(
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1540, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects)
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1629, in send response = await self._send_handling_auth(
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1657, in _send_handling_auth response = await self._send_handling_redirects(
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1694, in _send_handling_redirects response = await self._send_single_request(request)
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1730, in _send_single_request response = await transport.handle_async_request(request)
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 393, in handle_async_request with map_httpcore_exceptions():
 File "/Users/smujahid/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/lib/python3.12/contextlib.py", line 158, in __exit__ self.gen.throw(value)
 File "/Users/smujahid/repos/mozilla/bugbug/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 118, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectTimeout

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions