googleapis / googleapis/google-cloud-go
compute/metadata: support standard proxy envvars
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 1.6k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 109
Description
When looking into #10544 it was noticed that we never supported this because the metadata package creates its own http.Transport that does not set the proxy field:
https://github.com/googleapis/google-cloud-go/blob/978d4a1e47cbd8d4bf567b616381a2f12fac4cab/compute/metadata/metadata.go#L67-L75
By contrast the standard Go http.Transport sets this:
https://github.com/golang/go/blob/8f1ec59bdb2d095b9caf31f6f3fd3e167b14ef0a/src/net/http/transport.go#L44-L46
I believe it is a likely unintentional omission from the metadata package. Most other places we create http transports for client libraries we start by cloning DefaultTransport/DefaultClient
Contributor guide
Research direction
Start in compute/metadata/metadata.go around the package's custom http.Transport at lines 67-75, then compare it with Go's standard transport behavior linked in the issue. Verify how standard proxy environment variables are handled and confirm the metadata client uses that behavior. Done means the metadata package honors the standard proxy environment variables without disrupting its existing requests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 64/100