Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tool-Docker-action to v2.1.0 #21

Merged
merged 3 commits into from
Aug 16, 2024

Conversation

nwiltsie
Copy link
Member

This PR updates the tool-Docker-action Action to version 2.1.0. There are a few big changes in this version:

  1. Pushing to any branch foo will build this repository's image and tag it as branch-foo. That tagged image will be removed when the branch is deleted.
  2. By default the Action will only build SemVer tags (e.g. v1.2.3-xxx). Repositories that need to use other kinds of tags (e.g. v1.2beta) can pass the optional non-semver-tags argument; doing so will build all tags that begin with v.

There are a bunch of smaller changes buried in there - you can see them all at this link.

Based on this repository's existing tags, I've determined that it does follow semantic versioning. The updated workflow therefore does not pass the non-semver-tags argument to the Action, although it can be uncommented in the future if need be.

Copy link
Contributor

@Faizal-Eeman Faizal-Eeman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@nwiltsie nwiltsie mentioned this pull request Aug 16, 2024
@nwiltsie
Copy link
Member Author

Something's wonky here - the image isn't building correctly in this branch or on main. See #22.

@wiz-inc-8da00b022c
Copy link

wiz-inc-8da00b022c bot commented Aug 16, 2024

Wiz Scan Summary

IaC Misconfigurations 0C 0H 0M 1L 0I
Vulnerabilities 0C 0H 0M 0L 0I
Sensitive Data 0C 0H 0M 0L 0I
Total 0C 0H 0M 1L 0I
Secrets 0🔑

@nwiltsie
Copy link
Member Author

Okay @Faizal-Eeman, I think that I've got the build repaired.

  1. I switched the base image from r-base to rocker/r-ver because the former is not version-pinned (see Docker image r-base:4.2.1 not reproducible rocker-org/rocker#540 (comment)).
  2. r-base installs R into /usr/lib while r-ver installs it into /usr/local/lib, so I messed with the library logic (a0c4bc4) and it seems to work now.

Sanity-checking that, the install.packages command installs into /usr/local/lib/R/site-library...:

0.394 > install.packages(c("argparse", "BiocManager", "pkgdepends", "optparse"))
0.397 Installing packages into ‘/usr/local/lib/R/site-library’
0.397 (as ‘lib’ is unspecified)

So does the BiocManager::install command (I added some bold emphasis):

18.00 Bioconductor version 3.19 (BiocManager 1.30.23), R 4.4.1 (2024-06-14)
18.00 Installing package(s) 'BiocVersion', 'ellipsis', 'VariantAnnotation'
18.34 also installing the dependencies ‘formatR’, ‘glue’, ‘lifecycle’, ‘fastmap’, ‘sys’, ‘lambda.r’, ‘futile.options’, ‘bit’, ‘vctrs’, ‘cachem’, ‘askpass’, ‘abind’, ‘SparseArray’, ‘futile.logger’, ‘snow’, ‘BH’, ‘cpp11’, ‘bit64’, ‘blob’, ‘memoise’, ‘pkgconfig’, ‘plogr’, ‘png’, ‘mime’, ‘openssl’, ‘RCurl’, ‘rjson’, ‘yaml’, ‘matrixStats’, ‘UCSC.utils’, ‘GenomeInfoDbData’, ‘S4Arrays’, ‘DelayedArray’, ‘bitops’, ‘BiocParallel’, ‘crayon’, ‘RSQLite’, ‘KEGGREST’, ‘XML’, ‘httr’, ‘GenomicAlignments’, ‘BiocIO’, ‘restfulr’, ‘rlang’, ‘BiocGenerics’, ‘MatrixGenerics’, ‘GenomeInfoDb’, ‘GenomicRanges’, ‘SummarizedExperiment’, ‘Rsamtools’, ‘DBI’, ‘zlibbioc’, ‘Biobase’, ‘S4Vectors’, ‘IRanges’, ‘XVector’, ‘Biostrings’, ‘AnnotationDbi’, ‘rtracklayer’, ‘BSgenome’, ‘GenomicFeatures’, ‘Rhtslib’

62.18 * installing source package ‘zlibbioc’ ...
62.18 ** using staged installation
62.52 configure: creating ./config.status
62.60 config.status: creating src/Makevars
62.64 ** libs
62.65 using C compiler: ‘gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0’
62.65 mkdir -p "/usr/local/lib/R/site-library/00LOCK-zlibbioc/00new/zlibbioc/include"
62.66 gcc -I"/usr/local/lib/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c R_init_zlibbioc.c -o R_init_zlibbioc.o
62.67 gcc -shared -L/usr/local/lib/R/lib -L/usr/local/lib -o zlibbioc.so R_init_zlibbioc.o -L/usr/local/lib/R/lib -lR
62.68 installing to /usr/local/lib/R/site-library/00LOCK-zlibbioc/00new/zlibbioc/libs

The installer.R logs don't report the installation path, but the docker image itself shows that Battenberg was installed to /usr/local/lib/R/site-library:

$ docker run -it ghcr.io/uclahs-cds/battenberg:branch-nwiltsie_update_docker_action ls -1 /usr/local/lib/R/site-library/Battenberg
DESCRIPTION
example
extdata
help
html
INDEX
LICENSE
Meta
NAMESPACE
R
TODO

@Faizal-Eeman
Copy link
Contributor

The installer.R logs don't report the installation path, but the docker image itself shows that Battenberg was installed to /usr/local/lib/R/site-library:
docker run -it ghcr.io/uclahs-cds/battenberg:branch-nwiltsie_update_docker_action ls -1 /usr/local/lib/R/site-library/Battenberg

Yup, tested the above command and confirming Battenberg is available in /usr/local/lib/R/site-library

@Faizal-Eeman
Copy link
Contributor

Thanks a lot @nwiltsie. I'm merging this PR.

@Faizal-Eeman Faizal-Eeman merged commit 23cd01c into main Aug 16, 2024
6 checks passed
@nwiltsie nwiltsie deleted the nwiltsie_update_docker_action branch August 16, 2024 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants