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

chore: ban http.Transport & http.Client; add cleanhttp #8991

Merged
merged 3 commits into from
Mar 13, 2024

Conversation

carolinaecalderon
Copy link
Contributor

@carolinaecalderon carolinaecalderon commented Mar 12, 2024

Description

Ban use of http.Transport and http.Client in the codebase. Instead, use cleanhttp library.

Test Plan

Pass existing tests.

Commentary (optional)

Checklist

  • Changes have been manually QA'd
  • User-facing API changes need the "User-facing API Change" label.
  • Release notes should be added as a separate file under docs/release-notes/.
    See Release Note for details.
  • Licenses should be included for new code which was copied and/or modified from any external code.

Ticket

RM-85

@cla-bot cla-bot bot added the cla-signed label Mar 12, 2024
Copy link

netlify bot commented Mar 12, 2024

Deploy Preview for determined-ui canceled.

Name Link
🔨 Latest commit 752be0e
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/65f1b6a22ca11400091c33f3

Copy link

codecov bot commented Mar 12, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 47.49%. Comparing base (0a2fd28) to head (752be0e).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8991      +/-   ##
==========================================
- Coverage   47.51%   47.49%   -0.03%     
==========================================
  Files        1168     1168              
  Lines      176306   176306              
  Branches     2353     2351       -2     
==========================================
- Hits        83765    83729      -36     
- Misses      92383    92419      +36     
  Partials      158      158              
Flag Coverage Δ
backend 42.57% <75.00%> (-0.09%) ⬇️
harness 64.00% <ø> (ø)
web 42.83% <ø> (ø)

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

Files Coverage Δ
master/internal/elastic/elastic.go 52.17% <100.00%> (ø)
master/internal/webhooks/shipper.go 84.46% <ø> (-5.83%) ⬇️
master/internal/webhooks/api_webhook.go 0.00% <0.00%> (ø)

... and 6 files with indirect coverage changes

@carolinaecalderon carolinaecalderon changed the title Carolinac/add cleanhttp lint chore: ban http.Transport & http.Client; add cleanhttp Mar 12, 2024
@carolinaecalderon carolinaecalderon marked this pull request as ready for review March 12, 2024 20:56
@carolinaecalderon carolinaecalderon requested review from a team as code owners March 12, 2024 20:56
@@ -79,6 +79,8 @@ linters-settings:
- 'fmt\.Print.*'
- 'metaV1.NamespaceAll' # Will error if someone has namespace restricted permissions.
- 'bundebug.WithVerbose'
- 'http.Client' # Instead, we encourage use of cleanhttp.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- 'http.Client' # Instead, we encourage use of cleanhttp.
- 'http.Client' # Use cleanhttp instead.

it is more than encouraged.

@carolinaecalderon carolinaecalderon merged commit 4730d76 into main Mar 13, 2024
69 of 81 checks passed
@carolinaecalderon carolinaecalderon deleted the carolinac/add-cleanhttp-lint branch March 13, 2024 14:50
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.

2 participants