AlexsLemonade / OpenPBTA-analysis

The analysis repository for the Open Pediatric Brain Tumor Atlas Project
Other
100 stars 67 forks source link

Add GitHub PAT to Docker builds in CircleCI to allow us to install R packages from GitHub without rate limiting #1469

Closed jaclyn-taroni closed 2 years ago

jaclyn-taroni commented 2 years ago

We've been having issues with Docker images failing to build because we can't install R packages from GitHub. Here's an example, and here's the relevant/informative bit of error message:

Error: Failed to install 'unknown package' from GitHub:
  HTTP error 403.
  API rate limit exceeded for 35.231.15.12. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

  Rate limit remaining: 0/60
  Rate limit reset at: 2022-06-27 17:26:38 UTC

  To increase your GitHub API rate limit
  - Use `usethis::browse_github_pat()` to create a Personal Access Token.
  - Use `usethis::edit_r_environ()` and add the token as `GITHUB_PAT`.

I've created a personal access token (PAT), which is scoped for public access only (i.e., no scope) for an account with very little public information, and added it as an environmental variable in CircleCI.

~This PR adds a step in the CircleCI workflow adding the PAT to .Renviron. It is my hope that this will circumvent us frequently getting rate limited.~

jaclyn-taroni commented 2 years ago

This should 100% not work right now, but hopefully it fails in the specific way I'm expecting it to fail.

jaclyn-taroni commented 2 years ago

Going to close in favor of #1477