AlexsLemonade / refinebio

Refine.bio harmonizes petabytes of publicly available biological data into ready-to-use datasets for cancer researchers and AI/ML scientists.
https://www.refine.bio/
Other
128 stars 19 forks source link

Fix "Error in loadNamespace(name) : there is no package called ‘BiocInstaller’" error #3222

Closed arkid15r closed 1 year ago

arkid15r commented 1 year ago

Context

In order to restore staging/prod deploy process CI/CD tests need to be fixed.

Problem or idea

#12 6.385 * Querying repositories for available source packages ... Done!
#12 18.65 Retrieving 'https://cloud.r-project.org/src/contrib/Archive/renv/renv_0.16.0.tar.gz' ...
#12 18.77       OK [downloaded 981 Kb in 0.11 seconds]
#12 19.03 Retrieving 'https://cloud.r-project.org/src/contrib/codetools_0.2-19.tar.gz' ...
#12 19.20       OK [downloaded 37.3 Kb in 0.16 seconds]
#12 19.37 Error in loadNamespace(name) : there is no package called ‘BiocInstaller’
#12 19.37 Calls: <Anonymous> ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
#12 19.37 Traceback (most recent calls last):
#12 19.37 15: renv::restore(prompt = FALSE, rebuild = TRUE)
#12 19.37 14: renv_restore_run_actions(project, diff, current, lockfile, rebuild)
#12 19.37 13: retrieve(packages)
#12 19.37 12: handler(package, renv_retrieve_impl(package))
#12 19.37 11: renv_retrieve_impl(package)
#12 19.37 10: renv_scope_bioconductor(project = project)
#12 19.37  9: renv_bioconductor_repos(project = project, version = version)
#12 19.37  8: renv_bioconductor_repos_biocinstaller(version)
#12 19.37  7: asNamespace("BiocInstaller")
#12 19.37  6: getNamespace(ns)
#12 19.37  5: tryCatch(loadNamespace(name), error = function(e) stop(e))
#12 19.37  4: tryCatchList(expr, classes, parentenv, handlers)
#12 19.37  3: tryCatchOne(expr, names, parentenv, handlers[[1L]])
#12 19.37  2: value[[3L]](cond)
#12 19.37  1: stop(e)
#12 19.37 Execution halted
#12 ERROR: process "/bin/bash -o pipefail -c Rscript renv_load.R" did not complete successfully: exit code: 1
------
 > [ 5/15] RUN Rscript renv_load.R:
#12 19.37  9: renv_bioconductor_repos(project = project, version = version)
#12 19.37  8: renv_bioconductor_repos_biocinstaller(version)
#12 19.37  7: asNamespace("BiocInstaller")
#12 19.37  6: getNamespace(ns)
#12 19.37  5: tryCatch(loadNamespace(name), error = function(e) stop(e))
#12 19.37  4: tryCatchList(expr, classes, parentenv, handlers)
#12 19.37  3: tryCatchOne(expr, names, parentenv, handlers[[1L]])
#12 19.37  2: value[[3L]](cond)
#12 19.37  1: stop(e)
#12 19.37 Execution halted
------
Dockerfile.downloaders:10
--------------------
   8 |     COPY workers/R/dependencies/downloaders/renv.lock .
   9 |     COPY workers/R/renv_load.R .
  10 | >>> RUN Rscript renv_load.R
  11 |
  12 |     COPY workers/data_refinery_workers/downloaders/requirements.txt .
--------------------
ERROR: failed to solve: process "/bin/bash -o pipefail -c Rscript renv_load.R" did not complete successfully: exit code: 1

Solution or next step

Troubleshoot and fix the R exception.

arkid15r commented 1 year ago

Resolved by https://github.com/AlexsLemonade/refinebio/pull/3231.