Skip to content

Unnecessarily uses two API calls if a pre-cached version is not requested #446

@anomiex

Description

@anomiex

Description:
If the version of node requested is not one of the versions pre-cached on the Actions job runners, this action will make two API calls to effectively do the same thing as downloading https://raw.githubusercontent.com/actions/node-versions/main/versions-manifest.json. Downloading that URL directly would use 0 API calls.

These API calls are counted against the API rate limits. In one small sampling in our repo while investigating "API rate limit exceeded" errors (data in GitHub support ticket 1513647), these calls represented 567 of the 958 hits (almost 60%) leading up to the event.

While the actual code involved appears to be in your actions/toolkit repo rather than this one. GitHub Support asked me to raise this here.

Action version:
v3

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

Node version 16.13.2, being installed by this action. Pnpm version 6.23.6.

Repro steps:
You can see it easily enough in this test run on my personal repo, which used this workflow.

Expected behavior:
API rate limit is not unnecessarily used.

Actual behavior:

  • Here, before running this action, we see the rate limit usage was 2/1000.
  • After using the action to install a cached version of node, here we see the usage was still 2/1000.
  • After using the action to install an uncached version of node, here we see the usage has gone up to 4/1000.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions