carpentries / feeds.carpentries.org

A repo to generate dynamic JSON data feeds for The Carpentries
https://feeds.carpentries.org
MIT License
3 stars 2 forks source link

help-wanted issues failing #78

Closed zkamvar closed 1 year ago

zkamvar commented 1 year ago

The help-wanted-issues feed is (and has been) failing for some time now with a 403 error:

I suspect that it might have to to with the Airtable API key, but I'm not sure right now.

> source('R/help_wanted_issues.R')

Attaching package: ‘purrr’

The following object is masked from ‘package:jsonlite’:

    flatten

✔ Using GitHub token!
ℹ Running gh query
ℹ Running gh query, got 100 records of about 200
Error in `map2()`:
ℹ In index: 1.
ℹ With name: Data Carpentry.
Caused by error:
! HTTP error: [40](https://github.com/carpentries/feeds.carpentries.org/actions/runs/5090547622/jobs/9149503724#step:22:41)3
INVALID_PERMISSIONS
Invalid permissions
Backtrace:
     ▆
  1. ├─base::source("R/help_wanted_issues.R")
  2. │ ├─base::withVisible(eval(ei, envir))
  3. │ └─base::eval(ei, envir)
  4. │   └─base::eval(ei, envir)
  5. ├─purrr::imap_dfr(...)
  6. │ └─purrr::map2(.x, vec_index(.x), .f, ...)
  7. │   └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
  8. │     ├─purrr:::with_indexed_errors(...)
  9. │     │ └─base::withCallingHandlers(...)
 10. │     ├─purrr:::call_with_cleanup(...)
 11. │     └─global .f(.x[[i]], .y[[i]], ...)
 12. │       └─orgs %>% keep_opted_in()
 13. ├─global keep_opted_in(.)
 14. │ ├─at_opted_in$Repositories$select_all() %>% ...
 15. │ └─at_opted_in$Repositories$select_all()
 16. │   └─airtabler::air_select(...)
 17. │     └─airtabler:::air_validate(res)
 18. │       └─base::stop(...)
 19. ├─dplyr::mutate(., lesson_program = tolower(lesson_program))
 20. └─base::.handleSimpleError(...)
 21.   └─purrr (local) h(simpleError(msg, call))
 22.     └─cli::cli_abort(...)
 23.       └─rlang::abort(...)
Execution halted
make: *** [Makefile:[57](https://github.com/carpentries/feeds.carpentries.org/actions/runs/5090547622/jobs/9149503724#step:22:58): help-wanted] Error 1
an error occured; skipping help-wanted issues
zkamvar commented 1 year ago

Given that the error is coming from the {airtabler} package, it's reasonable to suspect that our Airtable API key needs to be reset.

zkamvar commented 1 year ago

Relevant issue in Airtabler: https://github.com/bergant/airtabler/issues/19

zkamvar commented 1 year ago

This was fixed by replacing the AIRTABLE_API_KEY with a personal access token with read access.