Skip to content

Skip vignette rebuilds in R-CMD-check#15

Closed
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-r-cmd-check-workflow
Closed

Skip vignette rebuilds in R-CMD-check#15
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-r-cmd-check-workflow

Conversation

Copilot AI commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

R CMD check was failing because CI tried to rebuild vignettes that are intentionally committed as github_document-generated .md outputs, while check expects .html/.pdf artifacts from rebuilds. This updates the workflow to skip vignette building during check without weakening core package validation.

  • R-CMD-check args update

    • Added explicit args to r-lib/actions/check-r-package in .github/workflows/R-CMD-check.yml.
    • Includes --no-build-vignettes alongside existing check flags to prevent vignette recompilation in CI.
  • Behavioral impact

    • CI no longer attempts to re-knit vignette .Rmd files during R CMD check.
    • Avoids false failures tied to github_document output and network-dependent vignette code paths.
- uses: r-lib/actions/check-r-package@6f6e5bc62fba3a704f74e7ad7ef7676c5c6a2590
  with:
    upload-snapshots: true
    error-on: '"error"'
    args: c("--no-manual", "--as-cran", "--no-build-vignettes")
Original prompt

Fix R-CMD-check workflow to skip vignette building.

Current Issue

The R-CMD-check workflow is failing because it attempts to recompile vignettes, but the package uses output: github_document format which generates .md files instead of the .html or .pdf files that R CMD CHECK expects.

Solution

Add --no-build-vignettes flag to the R CMD CHECK args in .github/workflows/R-CMD-check.yml. This will skip vignette building during the check while still validating the package structure.

Change Details

File: .github/workflows/R-CMD-check.yml
Step: r-lib/actions/check-r-package

Add a new args parameter:

args: c("--no-manual", "--as-cran", "--no-build-vignettes")

The pre-compiled .md vignettes are already in version control and use the github_document format which is friendly for git diffs. Skipping vignette building in CI allows the check to pass while maintaining this approach.

The following is the prior conversation context from the user's chat exploration (may be truncated):

Assistant: Necesito crear una rama y PR. Déjame hacerlo con el coding agent:

Assistant: Estoy listo para crear un PR con la Opción 3. El cambio es simple y elegante:

Agregamos una variable de entorno _R_CHECK_VIGNETTES_SKIP_RUN_: true en el workflow que le dice a R CMD CHECK: "La vignettes están pre-compiladas, no intentes re-compilarlas".

Esto:
✅ Mantiene github_document (diffs más limpios en git)
✅ Acepta los .md pre-compilados que ya están en el repo
✅ Permite que R CMD CHECK siga validando la estructura del paquete
✅ Soluciona el fallo de PR #14

¿Procedo?

User: ya lo hice

Assistant: Este log es el antiguo (de 2026-06-02/03) - antes de tu fix. Déjame verificar si ya corriste el workflow nuevamente:

Assistant: Veo que los logs muestran el fallo anterior (antes de tu cambio). El workflow todavía está fallando porque aún intenta compilar las viñetas.

¿Ya pusheaste los cambios al PR? Espera a que se ejecute de nuevo. Si ya hiciste el cambio en .github/workflows/R-CMD-check.yml, debería:

  1. Agregaste _R_CHECK_VIGNETTES_SKIP_RUN_: true en la sección env
  2. El siguiente run debería saltarse el re-building de viñetas
  3. R-CMD-check debería pasar ✅

¿Puedes confirmar:

  • ¿Qué cambio exactamente hiciste al workflow?
  • ¿Ya hiciste push a la rama del PR?
  • ¿Triggeró un nuevo run?

Si aún sigue fallando, te muestro la solución exacta.

User: revisa mis cambios

Assistant: ✅ Perfecto, tu cambio está correcto:

     env:
       GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
       R_KEEP_PKG_SOURCE: yes
+      _R_CHECK_VIGNETTES_SKIP_RUN_: true

Pero el log que viste es del run anterior (antes de tu cambio).

El run que está activo ahora en PR #14 debería estar usando tu cambio. Déjame verificar si ya pasó:

Assistant: ✅ Perfecto, tu cambio está bien hecho:

_R_CHECK_VIGNETTES_SKIP_RUN_: true

El archivo .github/workflows/R-CMD-check.yml ya tiene el cambio. Pero veo que el run 26854962034 todavía dice failure.

Eso es porque ese run fue ANTES de tu cambio. El workflow se ejecutó con la versión antigua del archivo.

Necesitas que se ejecute de nuevo para que use la versión actualizada con tu fix. Las opciones:

  1. Push un commit nuevo a la rama de PR Matrix macOS ARM64 binary releases for R 4.3/4.4/4.5 with versioned asset naming #14 (cualquier cambio triggerará un nuevo run)
  2. Resync el PR (push vacío: git commit --allow-empty)
  3. Fuerza un re-run desde la UI de GitHub Actions

¿Hiciste algún commit después del cambio al workflow, o fue el último cambio que committeaste?

User: @pfizer-opensource/Open-Hotgenes/pull/14

Assistant: Entiendo. Ese job que me diste es del run anterior (el que falló). Necesitas que se ejecute un nuevo run con tu cambio actualizado.

Opción rápida: Fuerza un re-run desde GitHub

  1. Ve a: https://github.com/pfizer-opensource/Open-Hotgenes/actions/runs/26854962034
  2. Click en "Re-run all jobs" o "Re-run failed jobs"

O si prefieres hacerlo por CLI:

gh run rerun 26854962034

Eso ejecutará el workflow de nuevo con tu cambio del _R_CHECK_VIGNETTES_SKIP_RUN_: true incluido en el archivo.

¿Ya lo hiciste o quieres que te ayude con otra cosa?

User: (r-reticulate) K29054NKJK:Open-Hotgenes virger$ gh run rerun 26854962034
bash: gh: command not found

Assistant: Necesitas instalar gh (GitHub CLI). Pero hay una forma más fácil:

Simplemente haz un commit vacío y push a tu rama del PR:

git commit --allow-empty -m "Trigger workflow re-run"
git push

Eso triggeará automáticamente el workflow con tu cambio del _R_CHECK_VIGNETTES_SKIP_RUN_: true.

O si prefieres la UI: Ve a https://github.com/pfizer-opensource/Open-Hotgenes/actions/runs/26854962034 y busca el botón "Re-run failed jobs" en la parte superior derecha.

¿Cuál prefieres?

User: que tal con los workflows?

Assistant: Excelente! ✅ Tu cambio funciona:

Run ID Nombre Status Hace
26859113069 R-CMD-...

This pull request was created from Copilot chat.

Copilot AI changed the title [WIP] Fix R-CMD-check workflow to skip vignette building Skip vignette rebuilds in R-CMD-check Jun 3, 2026
Copilot AI requested a review from Rvirgenslane June 3, 2026 02:33
@Rvirgenslane Rvirgenslane deleted the copilot/fix-r-cmd-check-workflow branch June 3, 2026 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants