Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[BUG]: ops cannot reach a local apihost behind a proxy

Aperta Adatta ai principianti
#282 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
bun, go, python
Ambito
cli, networking

Direzione di ricerca

Segui i riferimenti a issue #175 e openserverless-cli PR #56, poi ricostruisci come ops configura apihost e passa le variabili d’ambiente del proxy ai comandi figlio. Riproduci il problema con un devcluster locale e HTTP_PROXY/HTTPS_PROXY impostati, mentre NO_PROXY è vuoto. Il risultato è raggiunto quando le richieste all’apihost locale bypassano il proxy, mentre quelle remote continuano a usarlo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

  • 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)
  1. ops setup devcluster and ops ide login openserverless http://miniops.me (no proxy yet).
  2. run a forward proxy that the shell can reach. (i'll attach the one i used below in the comments).
  3. export HTTP_PROXY=http://<proxy>:3128 HTTPS_PROXY=http://<proxy>:3128.
  4. in a sample project run ops ide deploy --packages fails, (i've already attached a bash output above for this).
  5. ops env list fails 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
Lingua principale
Python
Stelle
577
Fork
29
Merge medio
4g 23h
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/openserverless

Tutte le issue di apache/openserverless

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.