posit-dev / posit-dev/images-shared
Fail container builds if R package installation fails
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2
- Forks
- 0
- Avg merge
- 4d 13h
- Merged PRs (30d)
- 22
Description
We have seen situations where using install.packages() fails silently for certain packages. The goss tests have caught many of these, but we should fail the container build if any package installation fails.
We have a couple of implementation options.
Make all warnings errors:
R -e 'options(warn = 2) install.packages(c("dplyr", "ggplot2", "tidyr"), repos = "https://p3m.dev/cran/__linux__/noble/latest")'
Use pak for installation, which is a two-step process.
R -e 'install.packages("pak", repos = "https://p3m.dev/cran/__linux__/noble/latest"); library(pak)'
R -e 'options(repos = "https://p3m.dev/cran/__linux__/noble/latest"); pak::pak(c("dplyr", "ggplot2", "tidyr"))'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the container build steps that run R's install.packages() and review the existing goss tests, which have detected silent installation failures. Compare treating warnings as errors with the proposed pak-based installation flow, then make a failed package installation fail the build and extend the relevant goss coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100