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

[confighttp] Remove pointers from integer fields #12323

Merged
merged 3 commits into from
Feb 19, 2025

Conversation

evan-bradley
Copy link
Contributor

Description

I was looking through our defaults for a few confighttp.ClientConfig fields and found that 0 disables these fields in the underlying http.Transport object, which means we don't need them to be pointers.

Docs for the four fields we set in http.Transport here: https://pkg.go.dev/net/http#Transport.MaxIdleConns

I also stopped assigning defaults to any fields we take from http.DefaultTransport where setting them is a no-op since they aren't set in http.DefaultTransport.

Link to tracking issue

Helps unblock confighttp 1.0 from depending on #9478

@evan-bradley evan-bradley requested a review from a team as a code owner February 7, 2025 19:33
@evan-bradley evan-bradley requested a review from atoulme February 7, 2025 19:33
Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.37%. Comparing base (765e4a5) to head (e7ef178).
Report is 69 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12323      +/-   ##
==========================================
- Coverage   91.39%   91.37%   -0.03%     
==========================================
  Files         468      468              
  Lines       25591    25614      +23     
==========================================
+ Hits        23390    23405      +15     
- Misses       1785     1793       +8     
  Partials      416      416              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with removing the pointers here, just one question

@mx-psi mx-psi added this pull request to the merge queue Feb 19, 2025
Merged via the queue into open-telemetry:main with commit c2af75d Feb 19, 2025
41 checks passed
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.

6 participants