Skip to content
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

fix goroutine leak in client; add insecure TLS option #1238

Merged
merged 2 commits into from
Dec 13, 2022

Conversation

bobcallaway
Copy link
Member

This fixes a leaking goroutine (which comes from the underlying connection pool as noted at https://github.com/hashicorp/go-cleanhttp/blob/a0807dd79fc1680a7b1f2d5a2081d92567aab97d/cleanhttp.go#L19). In order to test this, we need to be able to use httptest with TLS enabled, which required enabling a client option for InsecureTLS connections.

Fixes: #1094

Signed-off-by: Bob Callaway bcallaway@google.com

Signed-off-by: Bob Callaway <bcallaway@google.com>
Signed-off-by: Bob Callaway <bcallaway@google.com>
@codecov-commenter
Copy link

codecov-commenter commented Dec 13, 2022

Codecov Report

Merging #1238 (e2bff75) into main (81956e9) will increase coverage by 0.05%.
The diff coverage is 100.00%.

❗ Current head e2bff75 differs from pull request most recent head b10c096. Consider uploading reports for the commit b10c096 to get more accurate results

@@            Coverage Diff             @@
##             main    #1238      +/-   ##
==========================================
+ Coverage   63.35%   63.41%   +0.05%     
==========================================
  Files          82       82              
  Lines        7628     7639      +11     
==========================================
+ Hits         4833     4844      +11     
  Misses       2185     2185              
  Partials      610      610              
Flag Coverage Δ
e2etests 47.87% <36.36%> (-0.02%) ⬇️
unittests 42.10% <100.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/client/options.go 100.00% <100.00%> (ø)
pkg/client/rekor_client.go 89.65% <100.00%> (+3.29%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@cpanato cpanato requested a review from asraa December 13, 2022 08:48
@dlorenc dlorenc merged commit 138dc5a into sigstore:main Dec 13, 2022
@github-actions github-actions bot added this to the v1.1.0 milestone Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rekor client leaks goroutine
4 participants