bazel-contrib / bazel-contrib/rules_jvm_external
bazel does not honor https_proxy and no_proxy environment settings on windows
- Dominant language
- Java
- Stars
- 373
- Forks
- 301
- Avg merge
- 7d 17h
- Merged PRs (30d)
- 3
Description
### Description of the problem / feature request:
If I set on windows environment variables for bazel regarding proxy, the `no_proxy` setting seems to be ignored or not working correctly (hard to find out).
### Feature requests: what underlying problem are you trying to solve with this feature?
I'm trying to use bazel with the following setup:
* External resources (like to download bazel rules) need to go through a corporate proxy. To do this I setup the proxy (with Powershell) like this:
`$env:https_proxy="http://my.cortporate.proxy:3128"`
This works correct and bazel seems to download some rules (after a fresh installation).
Now I have a rule like "`rules_jvm_external`" which is used to download project dependency like maven from an internal corporate repository. This repository is internal and all requests to this should NOT go through the proxy. So I tried the following for my example domain https://my.corporate.domain/nexus with Powershell:
`$env:no_proxy=".corporate.domain,*.corporate.domain`
But both are not working. Bazel only starts to download my maven dependencies after remove the `https_proxy` variable from the environment.
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Setup an internal repository to download maven dependencies. Using a proxy to download all the rest from the internet.
setup the https_proxy, http_proxy and no_proxy environment variables ... now the download from the "`no_poxy`" repository does not work.
You can also test it like this: setup `https_poxy` to something (where you know it does not work) and setup `no_proxy` to exclude for example `.gihub.com` ... then I would expect that bazel can download from github.com ... but it doesn't.
### What operating system are you running Bazel on?
Windows 10
### What's the output of `bazel info release`?
release 1.0.0
### Have you found anything relevant by searching the web?
Not really
Contributor guide
Research direction
Reproduce on Windows 10 with Bazel 1.0.0 by setting https_proxy, http_proxy, and no_proxy, then attempting to fetch an internal Maven repository or github.com. Trace the proxy handling used by rules_jvm_external and verify that excluded hosts bypass the proxy while external resources still use it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100