Skip to content

fix: add retry client for pull and push operation#102

Merged
gaius-qi merged 1 commit intomainfrom
fix/retry
Mar 4, 2025
Merged

fix: add retry client for pull and push operation#102
gaius-qi merged 1 commit intomainfrom
fix/retry

Conversation

@chlins
Copy link
Member

@chlins chlins commented Mar 4, 2025

This pull request includes changes to the backend's pull and push functionalities to enhance the reliability of HTTP client operations by incorporating retry mechanisms. The most important changes include adding a new import for the retry package and modifying the HTTP client initialization to use the retry transport.

Closes #101

Enhancements to HTTP client reliability:

  • pkg/backend/pull.go: Added import for retry package (oras.land/oras-go/v2/registry/remote/retry) and modified the HTTP client initialization to use retry.NewTransport for handling retries during pull operations. [1] [2]
  • pkg/backend/push.go: Added import for retry package (oras.land/oras-go/v2/registry/remote/retry) and set the Client field of the auth.Client to retry.DefaultClient for handling retries during push operations. [1] [2]

Signed-off-by: chlins <chlins.zhang@gmail.com>
Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

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

LGTM

@gaius-qi gaius-qi merged commit 85b3c2f into main Mar 4, 2025
5 checks passed
@gaius-qi gaius-qi deleted the fix/retry branch March 4, 2025 03:29
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.

Large file downloads require support for retry

2 participants