Add flags to backfill script#2146
Conversation
Signed-off-by: Colleen Murphy <colleenmurphy@google.com>
Add options to the rekor client to set the minimum and maximum retry time, and make all rekor client options configurable for the backfill script. Signed-off-by: Colleen Murphy <colleenmurphy@google.com>
Add flags to the backfill script to allow passing custom headers to the Rekor service. The Rekor infrastructure may be configured to respond in certain ways to certain headers. Signed-off-by: Colleen Murphy <colleenmurphy@google.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2146 +/- ##
==========================================
+ Coverage 66.46% 68.11% +1.65%
==========================================
Files 92 92
Lines 9258 7308 -1950
==========================================
- Hits 6153 4978 -1175
+ Misses 2359 1591 -768
+ Partials 746 739 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
| } | ||
|
|
||
| rekorClient, err := client.GetRekorClient(*rekorAddress, client.WithNoDisableKeepalive(true), client.WithRetryCount(10)) | ||
| opts := []client.Option{client.WithNoDisableKeepalives(!*rekorDisableKeepalives)} |
There was a problem hiding this comment.
Bob had mentioned last time, but the double negatives are a bit confusing, especially since we negate the input. Do you think it would be cleaner to switch these to DisableKeepAlive?
There was a problem hiding this comment.
I tried that on the first iteration of this PR, the problem is in GetRekorClient, if we had this:
defaultTransport.DisableKeepAlives = o.DisableKeepalives
as opposed to conditioning on the negative, then if the option is unset it actually reverses the default behavior and several unit tests fail. The double negative helps distinguish whether the setting was unset or explicitly false.
Add retry options and make all configurable
Add options to the rekor client to set the minimum and maximum retry
time, and make all rekor client options configurable for the backfill
script.
Add ability to set custom headers in backfill
Add flags to the backfill script to allow passing custom headers to the
Rekor service. The Rekor infrastructure may be configured to respond
in certain ways to certain headers.
Summary
Release Note
Documentation