-
Notifications
You must be signed in to change notification settings - Fork 228
Description
Describe the bug
In a GitHub Action workflow, the workflow often (but not always) fails during a lib/actions/setup-r-dependencies@v2 step with the following error:
Reading package lists...
Building dependency tree...
Reading state information...
Package pandoc-citeproc is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'pandoc-citeproc' has no installation candidate
Error:
! error in pak subprocess
Caused by error in `processx::run(sh, cmdline, stdout_callback = callback, stderr_to_stdout = TRUE)`:
! System command 'sudo' failed
---
Backtrace:
1. pak::lockfile_install(".github/pkg.lock")
2. pak:::remote(function(...) { …
3. err$throw(res$error)
---
Subprocess backtrace:
1. base::withCallingHandlers(cli_message = function(msg) { …
2. get("lockfile_install_internal", asNamespace("pak"))(...)
3. plan$install_sysreqs()
4. pkgdepends:::sysreqs_install(cmds, config)
5. base::lapply(cmds, function(cmd) { …
6. local FUN(X[[i]], ...)
7. processx::run(sh, cmdline, stdout_callback = callback, stderr_to_stdout = …
8. base::throw(new_process_error(res, call = sys.call(), echo = echo, …
9. | base::signalCondition(cond)
10. global (function (e) …
Execution halted
Error: Process completed with exit code 1.However, the workflow sometimes succeeds. I have observed no particular pattern to when it succeeds versus fails. This bug was also identified by Paul Bürkner:
https://forum.posit.co/t/github-action-e-package-pandoc-citeproc-has-no-installation-candidate/197536/2
It was noted that the problem can be resolved by reverting from ubuntu-latest (which is currently version 24.04.2) to ubuntu-22.04.
To Reproduce
Here is a link to a failed build:
https://github.com/isaactpetersen/Fantasy-Football-Analytics-Textbook/actions/runs/13927168427/job/38974622392
Here is my workflow file:
on:
workflow_dispatch:
push:
branches: main
name: Quarto Publish to HTML
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
lfs: true
- name: Checkout LFS objects
run: git lfs checkout
- name: Setup R
uses: r-lib/actions/setup-r@v2
- name: Session info
run: Rscript -e 'sessionInfo()'
- name: Setup pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Install libcurl on Linux
if: runner.os == 'Linux'
run: sudo apt-get update -y && sudo apt-get install -y libcurl4-openssl-dev
- name: Install tinytex
uses: r-lib/actions/setup-tinytex@v2
- name: Install package dependencies
uses: r-lib/actions/setup-r-dependencies@v2
- name: Install cmdstan
run: |
cmdstanr::check_cmdstan_toolchain(fix = TRUE)
cmdstanr::install_cmdstan(cores = 2)
shell: Rscript {0}
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
env:
QUARTO_PROFILE: html
with:
to: html
- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
render: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: _book
path: |
_book/
*.tex
*.mdExpected behavior
I expect the workflow to be able to make use of pandoc-citeproc and to succeed.