rstudio / rsconnect

Publish Shiny Applications, RMarkdown Documents, Jupyter Notebooks, Plumber APIs, and more
http://rstudio.github.io/rsconnect/
131 stars 80 forks source link

test-bundlePackageRenv.R BioC test failure from winbuilder #899

Closed aronatkins closed 1 year ago

aronatkins commented 1 year ago

When run with devtools::check_win_devel(), we see the failure:

  ── Error ('test-bundlePackageRenv.R:36:3'): works with BioC packages ───────────
  Error in `renv_snapshot_validate_report(valid, prompt, force)`: aborting snapshot due to pre-flight validation failure
  Backtrace:
       ▆
    1. ├─testthat::expect_no_condition(...) at test-bundlePackageRenv.R:36:2
    2. │ └─testthat:::expect_no_(...)
    3. │   └─testthat:::quasi_capture(enquo(object), NULL, capture)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─rlang::try_fetch(...)
    6. │     │   └─base::withCallingHandlers(...)
    7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    8. └─rsconnect:::snapshotRenvDependencies(app)
    9.   └─renv::snapshot(bundleDir, prompt = FALSE)
   10.     └─renv:::renv_snapshot_validate_report(valid, prompt, force)

Attempted to address with skip_if_not_installed("Biobase"), but that was not the problem.

aronatkins commented 1 year ago

We are falling into this path:

https://github.com/rstudio/rsconnect/blob/1046fb243224c8ce108a47e018a6bd12795407b6/R/bundlePackageRenv.R#L103-L108

which uses the biocPackages value set at:

https://github.com/rstudio/rsconnect/blob/1046fb243224c8ce108a47e018a6bd12795407b6/R/bundlePackageRenv.R#L25-L29

defined by:

https://github.com/rstudio/rsconnect/blob/1046fb243224c8ce108a47e018a6bd12795407b6/R/bundlePackageRenv.R#L123-L126

aronatkins commented 1 year ago

With https://github.com/rstudio/rsconnect/pull/900, the winbuilder check no longer errs. The reason is not understood; keeping this issue open to track.

aronatkins commented 1 year ago

renv skips bioc tests conditionally:

https://github.com/rstudio/renv/blob/main/tests/testthat/test-bioconductor.R#L25-L26

@kevinushey - do you happen to recall the reasoning for skipping bioc tests when using unstable R?

kevinushey commented 1 year ago

I don't recall the original motivation, beyond Bioconductor tests being unnaturally fickle for some reason.

aronatkins commented 1 year ago

Thanks. I'll leave "skip it" as the answer for now, then. #900 started skipping the test.