Skip to content

Commit 6805ed8

Browse files
committed
[SPARK-56540][INFRA] Add libuv1-dev to CI Docker images to fix R package fs build failure
### What changes were proposed in this pull request? Add `libuv1-dev` to the `apt-get install` list in all five CI Dockerfiles that install R packages: - `dev/spark-test-image/sparkr/Dockerfile` - `dev/spark-test-image/lint/Dockerfile` - `dev/spark-test-image/docs/Dockerfile` - `dev/infra/Dockerfile` - `dev/create-release/spark-rm/Dockerfile.base` ### Why are the changes needed? The R package `fs` now requires system library `libuv` (`uv.h`). `fs` is a transitive dependency of both `rmarkdown` (via `sass` → `bslib`) and `testthat` (via `pkgload`). When the Docker layer cache is valid, the pre-built R packages are reused and everything works fine. But when the cache is invalidated (e.g. base image digest changes), the R packages are compiled from source. Without `libuv1-dev` installed, `fs` fails to configure: ``` Configuration failed because libuv was not found. Try installing: * deb: libuv1-dev (Debian, Ubuntu, etc) ... <stdin>:1:10: fatal error: uv.h: No such file or directory ERROR: configuration failed for package 'fs' ``` This triggers a cascade: ``` fs (missing libuv) → FAIL └→ sass → FAIL └→ bslib → FAIL └→ rmarkdown → FAIL └→ pkgload → FAIL └→ testthat → FAIL ``` The image build itself still "succeeds" because `install.packages()` in R does not return a non-zero exit code when individual packages fail to install -- it logs warnings but continues. So the Docker image gets pushed with `rmarkdown` and `testthat` missing, and the SparkR job fails at test time: ``` Error in library(testthat) : there is no package called 'testthat' ``` ``` Error: processing vignette 'sparkr-vignettes.Rmd' failed with diagnostics: there is no package called 'rmarkdown' ``` Example failure: https://github.com/LuciferYang/spark/actions/runs/24612026450/job/71969572946 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? - Pass Github Actions ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code Closes #55414 from LuciferYang/fix-sparkr-dockerfile-libuv. Authored-by: YangJie <yangjie01@baidu.com> Signed-off-by: yangjie01 <yangjie01@baidu.com>
1 parent 38d5dc4 commit 6805ed8

5 files changed

Lines changed: 5 additions & 0 deletions

File tree

dev/create-release/spark-rm/Dockerfile.base

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ RUN apt-get update && apt-get install -y \
6161
libpng-dev \
6262
libssl-dev \
6363
libtiff5-dev \
64+
libuv1-dev \
6465
libwebp-dev \
6566
libxml2-dev \
6667
msmtp \

dev/infra/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ RUN apt-get update && apt-get install -y \
5353
libpython3-dev \
5454
libssl-dev \
5555
libtiff5-dev \
56+
libuv1-dev \
5657
libwebp-dev \
5758
libxml2-dev \
5859
nodejs \

dev/spark-test-image/docs/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ RUN apt-get update && apt-get install -y \
5252
libpython3-dev \
5353
libssl-dev \
5454
libtiff5-dev \
55+
libuv1-dev \
5556
libwebp-dev \
5657
libxml2-dev \
5758
nodejs \

dev/spark-test-image/lint/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ RUN apt-get update && apt-get install -y \
4949
libpng-dev \
5050
libssl-dev \
5151
libtiff5-dev \
52+
libuv1-dev \
5253
libwebp-dev \
5354
libxml2-dev \
5455
nodejs \

dev/spark-test-image/sparkr/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ RUN apt-get update && apt-get install -y \
5252
libpython3-dev \
5353
libssl-dev \
5454
libtiff5-dev \
55+
libuv1-dev \
5556
libwebp-dev \
5657
libxml2-dev \
5758
pandoc \

0 commit comments

Comments
 (0)