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

[oci] Add function for configuring transport with retry backoff #563

Merged
merged 1 commit into from
May 26, 2023

Conversation

somtochiama
Copy link
Member

This pull request is a follow-up to #533

It adds a function WithRetryTransport that accepts a remote.Backoff and returns a crane.Option that sets a transport which uses the backoff when retrying operations. This needed because the remote.WithRetryBackoff(backoff) is not used for retrying transport operations. For more context see: google/go-containerregistry#1692

@somtochiama somtochiama force-pushed the oci-timeout branch 2 times, most recently from 3d691e2 to 404b439 Compare May 25, 2023 09:09
@hiddeco hiddeco added the area/oci OCI related issues and pull requests label May 25, 2023
Copy link
Contributor

@darkowlzz darkowlzz left a comment

Choose a reason for hiding this comment

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

It LGTM!
Please squash the commits where applicable and add the relevant details in the body if needed.

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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/oci OCI related issues and pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants