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

relnotes: Sleep when hitting the secondary GH limit #2324

Merged
merged 1 commit into from
Nov 17, 2021

Conversation

puerco
Copy link
Member

@puerco puerco commented Nov 17, 2021

What type of PR is this?

/kind bug
/kind failing-test
/kind flake

What this PR does / why we need it:

The last couple of releases have been hitting a new secondary rate limit
in the GitHub API. This PR makes some changes to play a bit more fair with
the API.

Now, the notes gatherer interprets the GitHub API response. If the
secondary rate limit was hit, the functions that make a lot of calls
will now sleep for a minute+random before respawning.

Signed-off-by: Adolfo García Veytia (Puerco) [email protected]

Which issue(s) this PR fixes:

Fixes #2225
Fixes #2302

/priority critical-urgent
/assign @justaugustus @Verolop @palnabarun @saschagrunert
/cc @kubernetes/release-engineering
/milestone v1.23

Special notes for your reviewer:

Note: this functionality should go into the github package in release-sdk (looking into this)

Does this PR introduce a user-facing change?

The release notes gatherer will now sleep for a minute+random secs when hitting the GitHub API secondary rate limit. 

@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Nov 17, 2021
@k8s-ci-robot k8s-ci-robot added the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Nov 17, 2021
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Nov 17, 2021
@k8s-ci-robot k8s-ci-robot added the kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. label Nov 17, 2021
@k8s-ci-robot k8s-ci-robot requested a review from a team November 17, 2021 04:55
@k8s-ci-robot k8s-ci-robot added the kind/flake Categorizes issue or PR as related to a flaky test. label Nov 17, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Nov 17, 2021
@k8s-ci-robot k8s-ci-robot added priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 17, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: puerco

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added area/release-eng Issues or PRs related to the Release Engineering subproject sig/release Categorizes an issue or PR as relevant to SIG Release. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 17, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Nov 17, 2021
The last couple of releases have been hitting a new secondary rate limit
in the GitHub API. This PR makes some changes to play a bit more fair with
the API.

Now, the notes gatherer interprets the GitHub API responde. If the
secondary rate limit was hit, the functions that make a lot of calls
will now sleep for a minute+random before respawning.

Fixes 2225
Fixes 2302

Signed-off-by: Adolfo García Veytia (Puerco) <[email protected]>
@puerco
Copy link
Member Author

puerco commented Nov 17, 2021

This PR adds the retry capability to the notes package. The permanent fix is here:
kubernetes-sigs/release-sdk#11

Merging this should enable us to cut the next beta and patches and we can revert it once release-sdk ships the fix in a release.

@Verolop
Copy link
Contributor

Verolop commented Nov 17, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 17, 2021
@k8s-ci-robot k8s-ci-robot merged commit 1e6a233 into kubernetes:master Nov 17, 2021
@justaugustus
Copy link
Member

Merging this should enable us to cut the next beta and patches and we can revert it once release-sdk ships the fix in a release.

@puerco -- This can be fixed more formally with the release of https://github.com/kubernetes-sigs/release-sdk/releases/tag/v0.4.0! 🎉

@puerco
Copy link
Member Author

puerco commented Nov 17, 2021

I'll revert to the fix in the package now that the new release is out (once we are done with patch releases)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. kind/flake Categorizes issue or PR as related to a flaky test. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/release Categorizes an issue or PR as relevant to SIG Release. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

integration tests hit github api rate limit Release notes API rate limiting throws 403
6 participants