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

enable configurable client retries with backoff in RekorClient #1096

Merged
merged 3 commits into from
Oct 5, 2022

Conversation

bobcallaway
Copy link
Member

This adds a configurable amount of retries for users of RekorClient, as well as the ability to customize the logger. The underlying library (github.com/hashicorp/go-retryablehttp) implements exponential backoff and respects Retry-After response headers.

I'll push up another PR that changes rekor-cli to take advantage of these changes.

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

Signed-off-by: Bob Callaway <bcallaway@google.com>
@bobcallaway bobcallaway requested a review from a team as a code owner October 5, 2022 15:30
Signed-off-by: Bob Callaway <bcallaway@google.com>
asraa
asraa previously approved these changes Oct 5, 2022
Copy link
Contributor

@asraa asraa left a comment

Choose a reason for hiding this comment

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

LOVE IT!

priyawadhwa
priyawadhwa previously approved these changes Oct 5, 2022
Copy link
Contributor

@priyawadhwa priyawadhwa left a comment

Choose a reason for hiding this comment

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

nice!

Signed-off-by: Bob Callaway <bcallaway@google.com>
@bobcallaway bobcallaway dismissed stale reviews from priyawadhwa and asraa via b7336ec October 5, 2022 16:40
@codecov-commenter
Copy link

Codecov Report

Merging #1096 (b7336ec) into main (8ef2695) will increase coverage by 0.07%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1096      +/-   ##
==========================================
+ Coverage   63.68%   63.75%   +0.07%     
==========================================
  Files          82       82              
  Lines        7559     7574      +15     
==========================================
+ Hits         4814     4829      +15     
  Misses       2119     2119              
  Partials      626      626              
Flag Coverage Δ
e2etests 48.48% <52.63%> (-0.02%) ⬇️
unittests 40.85% <100.00%> (+0.12%) ⬆️

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.28% <100.00%> (+2.32%) ⬆️

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

@bobcallaway bobcallaway merged commit be91b71 into sigstore:main Oct 5, 2022
@github-actions github-actions bot added this to the v1.0.0 milestone Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants