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: passing invalid logger to retriable http client #3285

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

markphelps
Copy link
Collaborator

Fixes: #3283

It seems the retryiableHTTP lib accepts any old interface{} for its Logger.. this is why it passed buildtime but fails at runtime since it actually enforces the logger type at runtime

https://github.com/hashicorp/go-retryablehttp/blob/40b0cad1633fd521cee5884724fcf03d039aaf3f/client.go#L408

simple fix here is to just not pass our own logger to the httpClient

Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
@markphelps markphelps requested a review from a team as a code owner July 17, 2024 19:03
Copy link

codecov bot commented Jul 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.12%. Comparing base (f5b32ed) to head (bb326fc).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3285   +/-   ##
=======================================
  Coverage   64.12%   64.12%           
=======================================
  Files         168      168           
  Lines       13393    13392    -1     
=======================================
  Hits         8588     8588           
+ Misses       4147     4146    -1     
  Partials      658      658           
Flag Coverage Δ
unittests 64.12% <ø> (+<0.01%) ⬆️

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

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

@markphelps markphelps added the automerge Used by Kodiak bot to automerge PRs label Jul 17, 2024
Copy link
Collaborator

@erka erka left a comment

Choose a reason for hiding this comment

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

nice

@kodiakhq kodiakhq bot merged commit 2bb2635 into main Jul 17, 2024
57 checks passed
@kodiakhq kodiakhq bot deleted the fix-invalid-logger branch July 17, 2024 19:33
markphelps added a commit that referenced this pull request Jul 17, 2024
* main:
  fix: passing invalid logger to retriable http client (#3285)
  chore(deps): bump dagger/dagger-for-github from 5 to 6 (#3280)
  chore: prep for 1.46 release (#3282)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Used by Kodiak bot to automerge PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] panic when using audit webhook
2 participants