lcolladotor / biocthis

Automate package and project setup for Bioconductor packages
https://lcolladotor.github.io/biocthis/
50 stars 17 forks source link

[BUG] GitHub Action fails installing Linux dependencies #23

Closed mfansler closed 3 years ago

mfansler commented 3 years ago

Not sure this is the right place to file this, but I figured that others who use this feature might search here for a solution.

Context

I configured GitHub Actions with biocthis::use_bioc_github_action() on a prospective Bioconductor package I am working on. I had an example in a function's documentation that used the GenomicFeatures::makeTxDbFromUCSC() method, which internally uses the RMariaDB package.

Code

Because of the RMariaDB dependency, I included

DESCRIPTION

Suggests: RMariaDB

When running the Linux version of the GitHub action, the code

remotes::system_requirements("ubuntu", "20.04")

subsequently includes libmysqlclient-dev and mysql-server.

GitHub Action Fails

The GitHub Action fails to install the mysql-server dependency on the Linux image (see error in log).

The specific complaint appears related to configuring mysql-server:

dpkg: error processing package mysql-server-8.0 (--configure):
  installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
  mysql-server depends on mysql-server-8.0; however:
    Package mysql-server-8.0 is not configured yet.
dpkg: error processing package mysql-server (--configure):
  dependency problems - leaving unconfigured

Workaround

Avoid dependencies that require mysql-server. That may not be possible for some, but fortunately in my case I could write a different example that avoided the RMariaDB dependency.

Discussion

I expect properly solving this would involve making the dependencies installation step more robust. That is, one can't simply rely on throwing them at apt-get install -y and expect them to work. However, this might involve a lot edge case handling (e.g., catching particular packages) which I don't think could be justified unless there was demand from end users.

lcolladotor commented 3 years ago

Hi!

I think that this is a case more for remotes::system_requirements than biocthis. However, like you mentioned, the solution might involve using apt-get commands directly on your custom GHA workflow.

Best, Leo