Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FBref advanced March stats GHA failing #17

Closed
JaseZiv opened this issue Oct 5, 2023 · 3 comments
Closed

FBref advanced March stats GHA failing #17

JaseZiv opened this issue Oct 5, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@JaseZiv
Copy link
Owner

JaseZiv commented Oct 5, 2023

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

@JaseZiv JaseZiv added the bug Something isn't working label Oct 5, 2023
@tonyelhabr
Copy link
Collaborator

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
Copy link
Collaborator

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

@JaseZiv
Copy link
Owner Author

JaseZiv commented Oct 6, 2023

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.

@JaseZiv JaseZiv closed this as completed Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants