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

add exponential backoff for retrying CNB registry requests #217

Merged
merged 2 commits into from
Mar 14, 2023

Conversation

sophiewigmore
Copy link
Member

@sophiewigmore sophiewigmore commented Mar 14, 2023

Summary

Add exponential backoff retry logic to the internal command which queries the CNB registry. This will hopefully reduce the number of automation errors we see from querying CNB registry (429 Too Many Requests).

We update our buildpack.toml files using the jam update-buildpack command, and frequently get notifications of failed updated due to hitting the 429 Too Many Requests error. As far as I know, authenticated requests to the registry are not enabled, so performing a retry when we encounter this issue is probably the simplest path forward. See paketo-buildpacks/php#659 for an example.

I opted to make this change in jam (rather than the workflow itself) because I have encountered this error locally before when using jam.

Use Cases

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@sophiewigmore sophiewigmore self-assigned this Mar 14, 2023
@sophiewigmore sophiewigmore force-pushed the update-buildpack-retry branch from 65d917c to 1c73e4b Compare March 14, 2023 17:33
@sophiewigmore sophiewigmore marked this pull request as ready for review March 14, 2023 17:33
@sophiewigmore sophiewigmore requested review from a team as code owners March 14, 2023 17:33
@sophiewigmore sophiewigmore added the semver:patch A change requiring a patch version bump label Mar 14, 2023
@ForestEckhardt ForestEckhardt merged commit 3a2126a into main Mar 14, 2023
@ForestEckhardt ForestEckhardt deleted the update-buildpack-retry branch March 14, 2023 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:patch A change requiring a patch version bump
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants