geocompx / geocompr

Geocomputation with R: an open source book
https://r.geocompx.org/
Other
1.59k stars 584 forks source link

GitHub API maxxed out #1049

Closed Robinlovelace closed 1 month ago

Robinlovelace commented 10 months ago

As shown here the build is failing: https://github.com/geocompx/geocompr/actions/runs/7612626738/job/20730641722

Run Rscript -e 'remotes::install_github("geocompx/geocompkg", dependencies = TRUE, force = TRUE)'
Using github PAT from envvar GITHUB_PAT
Error: Failed to install 'geocompkg' from GitHub:
  HTTP error 403.
  API rate limit exceeded for installation ID 32379693. If you reach out to GitHub Support for help, please include the request ID 5410:138E:51E494C:AB769FE:65AE7B0F.

  Rate limit remaining: 0/1000
  Rate limit reset at: 2024-01-22 14:28:17 UTC

  To increase your GitHub API rate limit
  - Use `usethis::create_github_token()` to create a Personal Access Token.
  - Use `usethis::edit_r_environ()` and add the token as `GITHUB_PAT`.
Execution halted
Error: Process completed with exit code 1.

There have been some recent changes, maybe we need to reduce the number of times actions run?

Nowosad commented 10 months ago

Maybe we could try to replace it with:

install.packages('geocompkg', repos = c('https://geocompr.r-universe.dev', 'https://cloud.r-project.org'), dependencies = TRUE, force = TRUE)

?

Robinlovelace commented 10 months ago

:+1: worth a try

Nowosad commented 10 months ago

The old approach is working again.

Robinlovelace commented 9 months ago

This seems to be an issue again. I've changed the settings meaning fewer PRs trigger actions (no need for typos):

image

@Nowosad anything else we can do?

Nowosad commented 9 months ago

@Robinlovelace each of our four workflows (https://github.com/geocompx/geocompr/tree/main/.github/workflows) starts with remotes::install_github("geocompr/geocompkg", dependencies = TRUE, force = TRUE) -- would it be possible to move this upstream to the docker images (that would be updated regularly)?

Robinlovelace commented 9 months ago

Yes. I don't think we need to force updates now the dust has settled.

The Docker images don't seem to be updating on their weekly scheduled jobs, not sure why. I've triggered a build with https://github.com/geocompx/docker/commit/8696f9289edd4051f9c3c51069de78df9b18dc4f

I think installing CRAN versions is fine for the suggests image as per https://github.com/geocompx/docker/blob/master/suggests/Dockerfile#L5

How about keeping remotes::install_github() only for dev workflow?

Nowosad commented 9 months ago

Yep -- sounds good.

Robinlovelace commented 2 months ago
Error:
! Failed to install 'tmap' from GitHub:
  HTTP error 401.
  Bad credentials

  Rate limit remaining: 59/60
  Rate limit reset at: 2024-09-24 07:53:53 UTC

Source: https://github.com/geocompx/geocompr/actions/runs/11008562683/job/30566434908

Robinlovelace commented 2 months ago

Hopefully fixed here: https://github.com/geocompx/geocompr/pull/1117/commits/63c4868e23606b4a1cffe501b9682ca7eef8523b

Robinlovelace commented 2 months ago

Let's wait for the PR to actually be merged before closing.