Skip to content

fix: sink HTTP clients to read proxy config from environment #341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 22, 2024

Conversation

TylerGillson
Copy link
Member

@TylerGillson TylerGillson commented Jul 22, 2024

Issue

#159

Description

Use http.DefaultClient, rather than constructing our own HTTP client manually. This will load proxy config from HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables by default.

Additionally, make failure to load the system cert pool a non-fatal error.

@TylerGillson TylerGillson requested a review from a team as a code owner July 22, 2024 20:40
@TylerGillson TylerGillson requested a review from mattwelke July 22, 2024 20:40
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Jul 22, 2024
Copy link

codecov bot commented Jul 22, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

@@            Coverage Diff             @@
##             main     #341      +/-   ##
==========================================
+ Coverage   48.62%   48.90%   +0.27%     
==========================================
  Files          22       22              
  Lines        1273     1274       +1     
==========================================
+ Hits          619      623       +4     
+ Misses        586      584       -2     
+ Partials       68       67       -1     
Files Coverage Δ
internal/sinks/sink.go 100.00% <100.00%> (ø)
internal/sinks/alertmanager.go 81.60% <0.00%> (-0.95%) ⬇️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c36994d...5c96fd2. Read the comment docs.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 22, 2024
@TylerGillson TylerGillson merged commit ffa327e into main Jul 22, 2024
8 checks passed
@TylerGillson TylerGillson deleted the fix/proxy-from-env branch July 22, 2024 21:13
TylerGillson added a commit that referenced this pull request Jul 22, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.0.48](v0.0.47...v0.0.48)
(2024-07-22)


### Bug Fixes

* sink HTTP clients to read proxy config from environment
([#341](#341))
([ffa327e](ffa327e))


### Other

* **deps:** bump github.com/hashicorp/go-retryablehttp from 0.7.5 to
0.7.7 ([#337](#337))
([c36994d](c36994d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Signed-off-by: Tyler Gillson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants