From e525106155a321b39a38db1a61352c320c066171 Mon Sep 17 00:00:00 2001 From: kirtimanmishrazipstack Date: Wed, 8 Jul 2026 15:31:39 +0530 Subject: [PATCH] UN-3699 [FIX] Bump runner docker-py to 7.1.0 for requests>=2.32 compat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit docker-py 6.1.3 is incompatible with requests>=2.32: its UnixHTTPAdapter only overrides the old get_connection path, so requests 2.32+ (locked at 2.33.0 via unstract-core) routes the internal http+docker:// socket URL to urllib3, raising URLSchemeUnknown -> DockerException at DockerClient.from_env(). This breaks any runner image rebuilt from main on the Docker container-client path (cloud/k8s is unaffected — it never calls from_env). Bump docker to 7.1.0, which handles requests>=2.32. Leaves the org-wide requests==2.33.0 untouched (lowering it is unsatisfiable: workers and x2text-service require >=2.33.0). Runner uses only stable high-level docker APIs; websocket-client drops out as it is now an optional docker extra and the runner uses no websocket features. Verified: docker 7.1.0 + requests 2.33.0 -> DockerClient.from_env().ping() == True against a real socket. Co-Authored-By: Claude Opus 4.8 (1M context) --- runner/pyproject.toml | 2 +- runner/uv.lock | 19 ++++--------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/runner/pyproject.toml b/runner/pyproject.toml index ba489a48ce..669cd348cb 100644 --- a/runner/pyproject.toml +++ b/runner/pyproject.toml @@ -8,7 +8,7 @@ readme = "README.md" license = { text = "MIT" } dependencies = [ - "docker==6.1.3", + "docker==7.1.0", "flask~=3.1.3", "python-dotenv>=1.2.2", "redis~=5.2.1", diff --git a/runner/uv.lock b/runner/uv.lock index 7128e6fdbc..becef7feda 100644 --- a/runner/uv.lock +++ b/runner/uv.lock @@ -146,18 +146,16 @@ wheels = [ [[package]] name = "docker" -version = "6.1.3" +version = "7.1.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "packaging" }, { name = "pywin32", marker = "sys_platform == 'win32'" }, { name = "requests" }, { name = "urllib3" }, - { name = "websocket-client" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/f0/73/f7c9a14e88e769f38cb7fb45aa88dfd795faa8e18aea11bababf6e068d5e/docker-6.1.3.tar.gz", hash = "sha256:aa6d17830045ba5ef0168d5eaa34d37beeb113948c413affe1d5991fc11f9a20", size = 259301, upload-time = "2023-06-01T14:24:49.268Z" } +sdist = { url = "https://files.pythonhosted.org/packages/91/9b/4a2ea29aeba62471211598dac5d96825bb49348fa07e906ea930394a83ce/docker-7.1.0.tar.gz", hash = "sha256:ad8c70e6e3f8926cb8a92619b832b4ea5299e2831c14284663184e200546fa6c", size = 117834, upload-time = "2024-05-23T11:13:57.216Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/db/be/3032490fa33b36ddc8c4b1da3252c6f974e7133f1a50de00c6b85cca203a/docker-6.1.3-py3-none-any.whl", hash = "sha256:aecd2277b8bf8e506e484f6ab7aec39abe0038e29fa4a6d3ba86c3fe01844ed9", size = 148096, upload-time = "2023-06-01T14:24:47.769Z" }, + { url = "https://files.pythonhosted.org/packages/e3/26/57c6fb270950d476074c087527a558ccb6f4436657314bfb6cdf484114c4/docker-7.1.0-py3-none-any.whl", hash = "sha256:c96b93b7f0a746f9e77d325bcfb87422a3d8bd4f03136ae8a85b37f1898d5fc0", size = 147774, upload-time = "2024-05-23T11:13:55.01Z" }, ] [[package]] @@ -910,7 +908,7 @@ test = [ [package.metadata] requires-dist = [ - { name = "docker", specifier = "==6.1.3" }, + { name = "docker", specifier = "==7.1.0" }, { name = "flask", specifier = "~=3.1.3" }, { name = "python-dotenv", specifier = ">=1.2.2" }, { name = "redis", specifier = "~=5.2.1" }, @@ -954,15 +952,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/03/ff/7c0c86c43b3cbb927e0ccc0255cb4057ceba4799cd44ae95174ce8e8b5b2/vine-5.1.0-py3-none-any.whl", hash = "sha256:40fdf3c48b2cfe1c38a49e9ae2da6fda88e4794c810050a728bd7413811fb1dc", size = 9636, upload-time = "2023-11-05T08:46:51.205Z" }, ] -[[package]] -name = "websocket-client" -version = "1.8.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/e6/30/fba0d96b4b5fbf5948ed3f4681f7da2f9f64512e1d303f94b4cc174c24a5/websocket_client-1.8.0.tar.gz", hash = "sha256:3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da", size = 54648, upload-time = "2024-04-23T22:16:16.976Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/5a/84/44687a29792a70e111c5c477230a72c4b957d88d16141199bf9acb7537a3/websocket_client-1.8.0-py3-none-any.whl", hash = "sha256:17b44cc997f5c498e809b22cdf2d9c7a9e71c02c8cc2b6c56e7c2d1239bfa526", size = 58826, upload-time = "2024-04-23T22:16:14.422Z" }, -] - [[package]] name = "werkzeug" version = "3.1.6"