Skip to content

Conversation

jsoref
Copy link

@jsoref jsoref commented Dec 20, 2024

When I triggered CI, it failed:

https://github.com/check-spelling-sandbox/setup-java/actions/runs/12417595625/job/34668910196

FAIL __tests__/distributors/graalvm-installer.test.ts
   findPackageForDownload  version is 24-ea -> /^https:\/\/github\.com\/graalvm\/oracle-graalvm-ea-builds\/releases\/download\/jdk-24\.0\.0-ea\./

    Fetching version info for GraalVM EA builds from 'https://api.github.com/repos/graalvm/oracle-graalvm-ea-builds/contents/versions/24-ea.json?ref=main' failed with the error: API rate limit exceeded for 13.105.117.111. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

      146 |         .result;
      147 |     } catch (err) {
    > 148 |       throw Error(
          |             ^
      149 |         `Fetching version info for GraalVM EA builds from '${url}' failed with the error: ${
      150 |           (err as Error).message
      151 |         }`

      at GraalVMDistribution.<anonymous> (src/distributions/graalvm/installer.ts:148:13)
          at Generator.throw (<anonymous>)
      at rejected (src/distributions/graalvm/installer.ts:29:65)

Adding the GITHUB_TOKEN would allow repositories that use this reusable workflow (such as actions/setup-java) to pass more reliably... check-spelling-sandbox/setup-java#2

@jsoref jsoref requested a review from a team as a code owner December 20, 2024 03:57
@priyagupta108
Copy link

Hi @jsoref 👋,

Thank you for your work on this PR. We’ve tested it with actions/setup-java, but unfortunately, we're still encountering failures due to GitHub API rate limiting. Here is a link to the test run for reference: Run.

It appears the changes in this PR aren’t resolving the issue as expected. Could you please review and let us know if there’s anything we might be missing in our configuration, or if there are any additional steps we should try?

@priyagupta108 priyagupta108 self-assigned this Jul 16, 2025
@jsoref
Copy link
Author

jsoref commented Aug 1, 2025

@priyagupta108 that's because you don't appear to be using getOctokit.

Here's an example where someone uses it:

https://github.com/jd-solanki/gh-action-comment-on-new-issue/blob/c443e1151cc69b146fd6918cc983ec1bd27ab254/index.js#L3-L8

Note that with this, you'd have an octokit that could send credentials out. You'd then need to use octokit.rest.<...> or something. That's beyond what I'm up to doing. Afaict you're just using a generic http client.

I could be wrong, but you work for GitHub and are in the actions org, and I'm not. If the docs are unclear, you could file a bug against the toolkit folks to improve them.

My changes are correct, but clearly insufficient because you module is broken beyond the fact that your tests aren't passing credentials.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants