From 0f62fa6d06f773f7d1438a32df30445995c27f3b Mon Sep 17 00:00:00 2001 From: Codex Date: Mon, 1 Jun 2026 08:21:32 +0000 Subject: [PATCH] fix(ci): route npm registry direct in docker build NO_PROXY The D601 provider-gateway egress proxy (127.0.0.1:18789) is a WebSocket-tunneled CONNECT proxy to backend-core. Long npm downloads (playwright tarball ~3MB, plus tarball streaming) trigger ECONNRESET mid-install, which then compounds into ENOTEMPTY on the next npm retry because the partial global install is not cleaned up. The in-dockerfile retry loop (5 attempts) exhausts and the image build fails at Step 12/37. The build's --build-arg NO_PROXY only listed localhost / 127.0.0.1 / ::1 / host.docker.internal, so every npm fetch went through the proxy. Direct curl tests from D601 to registry.npmjs.org succeed at HTTP 200 with ~280 KB/s, well above what the WS tunnel can sustain for multi-MB downloads. Persist the fix in both D601 and G14 pipeline manifests by adding registry.npmjs.org and .registry.npmjs.org to NO_PROXY so docker build's npm install goes direct. The proxy is still used for apt-get and any other traffic that doesn't match the expanded NO_PROXY list, so unrelated egress continues through the provider-gateway. Refs: #189 --- .../k3sctl-adapter/k3s/ci/unidesk-ci.pipeline.g14.yaml | 4 ++-- .../k3sctl-adapter/k3s/ci/unidesk-ci.pipeline.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/microservices/k3sctl-adapter/k3s/ci/unidesk-ci.pipeline.g14.yaml b/src/components/microservices/k3sctl-adapter/k3s/ci/unidesk-ci.pipeline.g14.yaml index 610fc207..c4f54187 100644 --- a/src/components/microservices/k3sctl-adapter/k3s/ci/unidesk-ci.pipeline.g14.yaml +++ b/src/components/microservices/k3sctl-adapter/k3s/ci/unidesk-ci.pipeline.g14.yaml @@ -447,7 +447,7 @@ spec: --build-arg HTTP_PROXY=http://127.0.0.1:18789 \ --build-arg HTTPS_PROXY=http://127.0.0.1:18789 \ --build-arg ALL_PROXY=http://127.0.0.1:18789 \ - --build-arg NO_PROXY=localhost,127.0.0.1,::1,host.docker.internal \ + --build-arg NO_PROXY=localhost,127.0.0.1,::1,host.docker.internal,registry.npmjs.org,.registry.npmjs.org \ --label "unidesk.ai/service-id=backend-core" \ --label "unidesk.ai/source-repo=$(params.repo-url)" \ --label "unidesk.ai/source-commit=$commit" \ @@ -715,7 +715,7 @@ spec: --build-arg HTTP_PROXY=http://127.0.0.1:18789 \ --build-arg HTTPS_PROXY=http://127.0.0.1:18789 \ --build-arg ALL_PROXY=http://127.0.0.1:18789 \ - --build-arg NO_PROXY=localhost,127.0.0.1,::1,host.docker.internal \ + --build-arg NO_PROXY=localhost,127.0.0.1,::1,host.docker.internal,registry.npmjs.org,.registry.npmjs.org \ --label "unidesk.ai/service-id=$service_id" \ --label "unidesk.ai/source-repo=$(params.repo-url)" \ --label "unidesk.ai/source-commit=$commit" \ diff --git a/src/components/microservices/k3sctl-adapter/k3s/ci/unidesk-ci.pipeline.yaml b/src/components/microservices/k3sctl-adapter/k3s/ci/unidesk-ci.pipeline.yaml index cf425c97..2167fd06 100644 --- a/src/components/microservices/k3sctl-adapter/k3s/ci/unidesk-ci.pipeline.yaml +++ b/src/components/microservices/k3sctl-adapter/k3s/ci/unidesk-ci.pipeline.yaml @@ -447,7 +447,7 @@ spec: --build-arg HTTP_PROXY=http://127.0.0.1:18789 \ --build-arg HTTPS_PROXY=http://127.0.0.1:18789 \ --build-arg ALL_PROXY=http://127.0.0.1:18789 \ - --build-arg NO_PROXY=localhost,127.0.0.1,::1,host.docker.internal \ + --build-arg NO_PROXY=localhost,127.0.0.1,::1,host.docker.internal,registry.npmjs.org,.registry.npmjs.org \ --label "unidesk.ai/service-id=backend-core" \ --label "unidesk.ai/source-repo=$(params.repo-url)" \ --label "unidesk.ai/source-commit=$commit" \ @@ -715,7 +715,7 @@ spec: --build-arg HTTP_PROXY=http://127.0.0.1:18789 \ --build-arg HTTPS_PROXY=http://127.0.0.1:18789 \ --build-arg ALL_PROXY=http://127.0.0.1:18789 \ - --build-arg NO_PROXY=localhost,127.0.0.1,::1,host.docker.internal \ + --build-arg NO_PROXY=localhost,127.0.0.1,::1,host.docker.internal,registry.npmjs.org,.registry.npmjs.org \ --label "unidesk.ai/service-id=$service_id" \ --label "unidesk.ai/source-repo=$(params.repo-url)" \ --label "unidesk.ai/source-commit=$commit" \