[BUG]: ops cannot reach a local apihost behind a proxy
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- cli, networking
Hướng nghiên cứu
Theo các tham chiếu đến issue #175 và openserverless-cli PR #56, rồi truy vết cách ops cấu hình apihost và truyền các biến môi trường proxy cho lệnh con. Tái hiện bằng một devcluster cục bộ, đặt HTTP_PROXY/HTTPS_PROXY trong khi NO_PROXY để trống. Hoàn thành khi các yêu cầu đến apihost cục bộ bỏ qua proxy, còn các yêu cầu từ xa vẫn tiếp tục sử dụng proxy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
- I have searched the issues of this repository and believe that this is not a duplicate.
Ⅰ. Issue Description
following up on #175 and https://github.com/apache/openserverless-cli/pull/56
The issue was that when HTTP_PROXY/HTTPS_PROXY are set, ops cannot talk to a local OpenServerless installation (eg. the devcluster at http://miniops.me, which resolves to 127.0.0.1). commands like ops ide deploy and ops env list failed, showing a ambigous error like repeat login.
The proxy variables themselves are honoured fine, go (ops -wsk, go-git), bun and curl all pick them up. so the suspection that the env vars propogation was the main culprit was wrong. the actual problem is that ops never sets its apihosts to NO_PROXY, so requests to the local apihost are also sent to the proxy, and the proxy cannot reach the developer's own machine. proxy for remote apihost worked fine, even before the fix.
Ⅱ. Describe what happened
with a forward proxy configured and no NO_PROXY, every request to the apihost goes to the proxy (even the local ones, that made it through a Repeat lgoin error. The proxy refuses the loopback target, so ops thinks the login is broken.
apache/issue175-test/proj
❯ export HTTP_PROXY=http://172.18.0.1:3128 HTTPS_PROXY=http://172.18.0.1:3128 NO_PROXY=
apache/issue175-test/proj
❯ ops ide deploy --packages
Repeat the login
ops: Failed to run task "deploy": exit status 1
task execution error: ops: Failed to run task "deploy": exit status 1
Ⅲ. Describe what you expected to happen
ops should work behind a proxy against a local installation, reqs to the local apihost go direct (bypassing the proxy, this can be done by appending the local apihost to NO_PROXY, everything else (github for ops -update, image registries,...) keeps going through the proxy.
Ⅳ. How to reproduce it (as minimally and precisely as possible)
ops setup devclusterandops ide login openserverless http://miniops.me(no proxy yet).- run a forward proxy that the shell can reach. (i'll attach the one i used below in the comments).
export HTTP_PROXY=http://<proxy>:3128 HTTPS_PROXY=http://<proxy>:3128.- in a sample project run
ops ide deploy --packagesfails, (i've already attached a bash output above for this). ops env listfails as well.
Ⅴ. Anything else we need to know?
this happened beause ops passes its environment to every child (wsk, bun, curl in tasks) and none of these bypass the proxy for a hostname unless it is in NO_PROXY. Go for example only auto-bypasses literal localhost/loopback IPs, not a name that resolves to one. Nothing in ops sets NO_PROXY, so the apihost is never excluded.
Ⅵ. Environment:
- K8S Runtime and version: kind (docker), Kubernetes v1.33.1,
ops setup devcluster - OPS CLI version: 0.9.0-incubating (0.9.0 branch, 2026-10 snapshot)
- Others: linux
- Ngôn ngữ chính
- Python
- Star
- 577
- Fork
- 29
- Merge trung bình
- 4 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/openserverless
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
apache/openserverless#269 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
apache/openserverless#267 ·
-
Streamer 0.9.0 hardening: authenticated callbacks and backward-incompatible client migrationĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
apache/openserverless#274 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 8/100
apache/openserverless#273 · 2 bình luận ·
-
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 42/100
apache/openserverless#271 · 9 bình luận ·
Tất cả issue của apache/openserverless
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 4 ngày
-
Add alembic upgrade predeployĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
ClockGU/clockwork-backend#169 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
aws-samples/sample-per-model-bedrock#616 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
chnm/teachinghistory-hugo#47 ·
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
pandas-dev/pandas-stubs#2047 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày