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

Retry container pull on HTTP 429 Too Many Requests #380

Open
JamieMagee opened this issue Nov 27, 2024 · 0 comments
Open

Retry container pull on HTTP 429 Too Many Requests #380

JamieMagee opened this issue Nov 27, 2024 · 0 comments

Comments

@JamieMagee
Copy link
Contributor

I'm seeing the following issue

cli | 2024/11/21 00:43:15 pulling image: ghcr.io/dependabot/dependabot-updater-npm
cli | 2024/11/21 00:43:15 updater failure: failed to pull ghcr.io/dependabot/dependabot-updater-npm: Error response from daemon: toomanyrequests: retry-after: 880.092µs, allowed: 44000/minute

We should be able to catch this error and use the retry-after header to sleep and retry:

cli/internal/infra/run.go

Lines 549 to 552 in 4e7612f

out, err := cli.ImagePull(ctx, imageName, imagePullOptions)
if err != nil {
return fmt.Errorf("failed to pull %v: %w", imageName, err)
}

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

No branches or pull requests

1 participant