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 Jitter to "Update Go" action schedule #979

Merged

Conversation

phil9909
Copy link
Member

Summary

Fixes #966 by adding a Jitter to the cron schedule (Alternative 2 in the issue)

The jitter is seeded with the repo name (GITHUB_REPOSITORY env) and will there produce a constant value for the same repo (unless renamed).

It is implemented in a separate package to be easily reused in other actions that might profit from this as well.

Use Cases

Prevent rate limiting

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).

@phil9909 phil9909 requested a review from a team January 20, 2023 15:29
Copy link
Contributor

@dmikusa dmikusa left a comment

Choose a reason for hiding this comment

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

Thank you very much for this. This was a high priority fix.

Two very minor notes around doc and I think this should be good to merge.

octo/jitter/jitter.go Outdated Show resolved Hide resolved
octo/jitter/jitter.go Show resolved Hide resolved
@dmikusa dmikusa added semver:minor A change requiring a minor version bump type:enhancement A general enhancement labels Jan 21, 2023
@phil9909 phil9909 force-pushed the add-jitter-to-update-go branch from 55b1f52 to aa78e4d Compare January 23, 2023 10:39
@phil9909 phil9909 requested a review from dmikusa January 23, 2023 10:40
Copy link
Contributor

@dmikusa dmikusa left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks very much!

@dmikusa dmikusa merged commit cfb787d into paketo-buildpacks:main Jan 24, 2023
@phil9909 phil9909 deleted the add-jitter-to-update-go branch January 24, 2023 08:34
This was referenced Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor A change requiring a minor version bump type:enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Go Modules Runs Causes Rate Limit Issues
2 participants