cli icon indicating copy to clipboard operation
cli copied to clipboard

Retry container pull on HTTP 429 Too Many Requests

Open JamieMagee opened this issue 1 year ago • 0 comments

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:

https://github.com/dependabot/cli/blob/4e7612fe884683ade8c54ad8fd137fc6da92bb84/internal/infra/run.go#L549-L552

JamieMagee avatar Nov 27 '24 16:11 JamieMagee