JaseZiv / worldfootballR_data

Project holding various data for the worldfootballR R package
55 stars 17 forks source link

FBref advanced March stats GHA failing #17

Closed JaseZiv closed 9 months ago

JaseZiv commented 9 months ago

Hey @tonyelhabr, have noticed the action to get advanced match stats has failed the last two runs... here's an example https://github.com/JaseZiv/worldfootballR_data/actions/runs/6423000511/job/17440614006

Happy to have a look in to it if you haven't got any time, but also absolutely no rush on this

tonyelhabr commented 9 months ago

Hmm, I can't seem to replicate the exact issue on local. Instead, I get an error message related to not setting the GitHub token when writing the file to the release.

@JaseZiv Is it possible for me to get developer access to this repo so that I can create a personal GitHub token for this repo? The GitHub actions should be fine using the ssecrets.GITHUB_TOKEN. I just need to create a personal token to use for interactive purposes.

> rlang::last_trace()
<error/dplyr:::mutate_error>
Error in `mutate()`:
ℹ In argument: `data = pmap(...)`.
Caused by error in `pmap()`:
ℹ In index: 28.
---
Backtrace:
     ▆
  1. ├─dplyr::mutate(...)
  2. ├─dplyr:::mutate.data.frame(...)
  3. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
  4. │   ├─base::withCallingHandlers(...)
  5. │   └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
  6. │     └─mask$eval_all_mutate(quo)
  7. │       └─dplyr (local) eval()
  8. ├─purrr::pmap(...)
  9. │ └─purrr:::pmap_("list", .l, .f, ..., .progress = .progress)
 10. │   ├─purrr:::with_indexed_errors(...)
 11. │   │ └─base::withCallingHandlers(...)
 12. │   ├─purrr:::call_with_cleanup(...)
 13. │   └─.f(...)
 14. │     └─global update_fb_advanced_match_stats(...)
 15. │       └─global write_worldfootballr_rds_and_csv(x = res, name = name, tag = fb_advanced_match_stats_tag)
 16. │         └─purrr::walk(...) at R/piggyback.R:31:2
 17. │           └─purrr::map(.x, .f, ..., .progress = .progress)
 18. │             └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
 19. │               ├─purrr:::with_indexed_errors(...)
 20. │               │ └─base::withCallingHandlers(...)
 21. │               ├─purrr:::call_with_cleanup(...)
 22. │               └─.f(.x[[i]], ...)
 23. │                 └─global write_worldfootballr(x = x, name = name, tag = tag, ext = .x)
 24. │                   └─piggyback::pb_upload(path, repo = worldfootballr_repo, tag = tag) at R/piggyback.R:23:2
 25. │                     ├─piggyback::pb_releases(repo, .token)
 26. │                     │ └─base::lapply(called_args, eval, parent.frame())
 27. │                     │   └─base (local) FUN(X[[i]], ...)
 28. │                     │     └─base (local) FUN(X[[i]], ...)
 29. │                     └─gh::gh_token()
 30. │                       └─gh:::gh_pat(token$password %||% "")
 31. │                         └─gh:::validate_gh_pat(new_gh_pat(x))
 32. │                           └─throw(...)
 33. │                             └─base::signalCondition(cond)
 34. ├─purrr (local) `<fn>`(`<rlib_rrr>`)
 35. │ └─cli::cli_abort(...)
 36. │   └─rlang::abort(...)
 37. │     └─rlang:::signal_abort(cnd, .file)
 38. │       └─base::signalCondition(cnd)
 39. └─purrr (local) `<fn>`(`<prrr_rr_>`)
 40.   └─cli::cli_abort(...)
---
Caused by error in `map()`:
ℹ In index: 1.
Caused by error:
! GitHub PAT must have one of these forms:
  * 40 hexadecimal digits (older PATs)
  * A 'ghp_' prefix followed by 36 to 251 more characters (newer PATs)
---
Backtrace:
     ▆
  1. ├─dplyr::mutate(...)
  2. ├─dplyr:::mutate.data.frame(...)
  3. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
  4. │   ├─base::withCallingHandlers(...)
  5. │   └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
  6. │     └─mask$eval_all_mutate(quo)
  7. │       └─dplyr (local) eval()
  8. └─purrr::pmap(...)
  9.   └─purrr:::pmap_("list", .l, .f, ..., .progress = .progress)
 10.     ├─purrr:::with_indexed_errors(...)
 11.     │ └─base::withCallingHandlers(...)
 12.     ├─purrr:::call_with_cleanup(...)
 13.     └─.f(...)
 14.       └─global update_fb_advanced_match_stats(...)
 15.         └─global write_worldfootballr_rds_and_csv(x = res, name = name, tag = fb_advanced_match_stats_tag)
 16.           └─purrr::walk(...) at R/piggyback.R:31:2
 17.             └─purrr::map(.x, .f, ..., .progress = .progress)
 18.               └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
 19.                 ├─purrr:::with_indexed_errors(...)
 20.                 │ └─base::withCallingHandlers(...)
 21.                 ├─purrr:::call_with_cleanup(...)
 22.                 └─.f(.x[[i]], ...)
 23.                   └─global write_worldfootballr(x = x, name = name, tag = tag, ext = .x)
 24.                     └─piggyback::pb_upload(path, repo = worldfootballr_repo, tag = tag) at R/piggyback.R:23:2
 25.                       ├─piggyback::pb_releases(repo, .token)
 26.                       │ └─base::lapply(called_args, eval, parent.frame())
 27.                       │   └─base (local) FUN(X[[i]], ...)
 28.                       │     └─base (local) FUN(X[[i]], ...)
 29.                       └─gh::gh_token()
 30.                         └─gh:::gh_pat(token$password %||% "")
 31.                           └─gh:::validate_gh_pat(new_gh_pat(x))
 32.                             └─throw(...)
 33.                               └─base::signalCondition(cond)
Run rlang::last_trace(drop = FALSE) to see 5 hidden frames.
tonyelhabr commented 9 months ago

Alas, it seems like the errors were flaky? I re-ran the action that failed yesterday and it succeeded.

JaseZiv commented 9 months ago

Alas, it seems like the errors were flaky? I re-ran the action that failed yesterday and it succeeded.

Ah awesome! Thanks heaps for investigating this.