[oci] Add function for configuring transport with retry backoff#563
Merged
stefanprodan merged 1 commit intofluxcd:mainfrom May 26, 2023
Merged
[oci] Add function for configuring transport with retry backoff#563stefanprodan merged 1 commit intofluxcd:mainfrom
stefanprodan merged 1 commit intofluxcd:mainfrom
Conversation
10 tasks
darkowlzz
reviewed
May 24, 2023
darkowlzz
reviewed
May 24, 2023
darkowlzz
reviewed
May 24, 2023
3d691e2 to
404b439
Compare
darkowlzz
reviewed
May 25, 2023
darkowlzz
approved these changes
May 25, 2023
Contributor
darkowlzz
left a comment
There was a problem hiding this comment.
It LGTM!
Please squash the commits where applicable and add the relevant details in the body if needed.
stefanprodan
approved these changes
May 25, 2023
This pr also splits LoginWithCredentials into a sub-function GetAuthFromCredentials that returns the Authenticator. This function can be used to get the authenticator for constructing the retry transport. Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request is a follow-up to #533
It adds a function
WithRetryTransportthat accepts a remote.Backoff and returns a crane.Option that sets a transport which uses the backoff when retrying operations. This needed because theremote.WithRetryBackoff(backoff)is not used for retrying transport operations. For more context see: google/go-containerregistry#1692