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

ci: reduce the amount of API calls made by arduino/setup-protoc@v1 #5930

Merged
merged 2 commits into from
Jan 10, 2023

Conversation

gustavovalverde
Copy link
Member

@gustavovalverde gustavovalverde commented Jan 9, 2023

Motivation

Every few days, multiple PRs will fail with GitHub "API rate-limit exceeded" errors. These errors seem to happen when there are multiple pushes to a PR within a short period of time.

Fixes #5819

Solution

If the protoc compiler version is not available locally, the action will look for the most recent version. We use a fixed version to reduce the amount of API calls being done in all workflows, but mainly on build-crates-individually.yml

Note: A recent update on bump tj-actions/changed-files also reduced the amount of API calls, based on our actual fetch configuration.

Review

Anyone can review this

Reviewer Checklist

  • Will the PR name make sense to users?
    • Does it need extra CHANGELOG info? (new features, breaking changes, large changes)
  • Are the PR labels correct?
  • Does the code do what the ticket and PR says?
    • Does it change concurrent code, unsafe code, or consensus rules?
  • How do you know it works? Does it have tests?

Follow Up Work

If the `protoc` compiler version is not available locally, the action will look for the most recent version. We use a fixed version to reduce the amount of API calls being done in all workflows, but mainly on `build-crates-individually.yml`
@gustavovalverde gustavovalverde requested a review from a team as a code owner January 9, 2023 15:17
@gustavovalverde gustavovalverde requested review from arya2 and removed request for a team January 9, 2023 15:17
@gustavovalverde gustavovalverde self-assigned this Jan 9, 2023
@github-actions github-actions bot added C-bug Category: This is a bug C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG labels Jan 9, 2023
@gustavovalverde gustavovalverde added A-devops Area: Pipelines, CI/CD and Dockerfiles P-Medium ⚡ I-integration-fail Continuous integration fails, including build and test failures and removed C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG labels Jan 9, 2023
Copy link
Contributor

@arya2 arya2 left a comment

Choose a reason for hiding this comment

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

This looks right, but the updated steps seem to fail:

Error: unable to get latest version
https://github.com/ZcashFoundation/zebra/actions/runs/3875142251/jobs/6607275825#step:3:13

@gustavovalverde
Copy link
Member Author

This looks right, but the updated steps seem to fail:

Oh, that's odd. That version actually exists. I'll update this with a lower version and see how it goes.

@github-actions github-actions bot added the C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG label Jan 10, 2023
Copy link
Contributor

@arya2 arya2 left a comment

Choose a reason for hiding this comment

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

Looks good!

Hopefully arduino/setup-protoc will work with later versions of protoc soon.

mergify bot added a commit that referenced this pull request Jan 10, 2023
@mergify mergify bot merged commit b060408 into main Jan 10, 2023
@mergify mergify bot deleted the fix-api-rate branch January 10, 2023 21:22
@oxarbitrage oxarbitrage mentioned this pull request Jan 29, 2023
36 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-devops Area: Pipelines, CI/CD and Dockerfiles C-bug Category: This is a bug C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG I-integration-fail Continuous integration fails, including build and test failures
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate GitHub "API rate-limit exceeded" errors
2 participants