[SPARK-56540][INFRA] Add libuv1-dev to CI Docker images to fix R package fs build failure#55414
Closed
LuciferYang wants to merge 1 commit intoapache:masterfrom
Closed
[SPARK-56540][INFRA] Add libuv1-dev to CI Docker images to fix R package fs build failure#55414LuciferYang wants to merge 1 commit intoapache:masterfrom
LuciferYang wants to merge 1 commit intoapache:masterfrom
Conversation
…age fs build failure The R package `fs` (a dependency of `rmarkdown`, `testthat` via `sass`/`bslib`/`pkgload`) requires `libuv` as a system dependency. When the Docker image cache is invalidated and images are rebuilt from scratch, `fs` fails to configure because `libuv1-dev` is not installed, causing a cascade failure: `fs` -> `sass`/`pkgload` -> `bslib` -> `rmarkdown`/`testthat`. The image build still succeeds (R's `install.packages` does not exit non-zero on individual package failures), but the resulting image is missing these packages, causing SparkR test failures at runtime. Add `libuv1-dev` to all five CI Dockerfiles that install R packages depending on `fs`: `sparkr`, `lint`, `docs`, `infra`, and `spark-rm`.
HyukjinKwon
approved these changes
Apr 19, 2026
dongjoon-hyun
approved these changes
Apr 20, 2026
Contributor
Author
|
Merged into master. Thanks @HyukjinKwon and @dongjoon-hyun |
LuciferYang
added a commit
to LuciferYang/spark
that referenced
this pull request
Apr 20, 2026
…age fs build failure
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`
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
No
- Pass Github Actions
Generated-by: Claude Code
Closes apache#55414 from LuciferYang/fix-sparkr-dockerfile-libuv.
Authored-by: YangJie <yangjie01@baidu.com>
Signed-off-by: yangjie01 <yangjie01@baidu.com>
LuciferYang
added a commit
to LuciferYang/spark
that referenced
this pull request
Apr 20, 2026
…age fs build failure
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`
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
No
- Pass Github Actions
Generated-by: Claude Code
Closes apache#55414 from LuciferYang/fix-sparkr-dockerfile-libuv.
Authored-by: YangJie <yangjie01@baidu.com>
Signed-off-by: yangjie01 <yangjie01@baidu.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Add
libuv1-devto theapt-get installlist in all five CI Dockerfiles that install R packages:dev/spark-test-image/sparkr/Dockerfiledev/spark-test-image/lint/Dockerfiledev/spark-test-image/docs/Dockerfiledev/infra/Dockerfiledev/create-release/spark-rm/Dockerfile.baseWhy are the changes needed?
The R package
fsnow requires system librarylibuv(uv.h).fsis a transitive dependency of bothrmarkdown(viasass→bslib) andtestthat(viapkgload).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-devinstalled,fsfails to configure:This triggers a cascade:
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 withrmarkdownandtestthatmissing, and the SparkR job fails at test time: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?
Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code