Integration tests runner downloads rustc again #21923
Labels
domain: ci
Anything related to Vector's CI environment
domain: dev
Anything related to Vector's development environment
Currently, the integration tests runner uses
docker.io/rust:1.81-slim-bookworm
as base image, which already contains all the toolchain for rust 1.81.But, when starting the runner, the current vector dir is mounted into the
vector-test-runner
containervector/vdev/src/testing/runner.rs
Line 245 in c3d91af
rust-toolchain.toml
file https://github.com/vectordotdev/vector/blob/master/rust-toolchain.toml that causes a whole new rust 1.81 toolchain installation when running the test command inside the containervector/vdev/src/testing/runner.rs
Line 17 in c3d91af
as seen in the following screenshot:
see the "downloading component" part, this should not happen if we are already using a base image containing all the rust components.
Given this, it makes no sense to use a versioned rustc base image, as the current version from
rust-toolchain.toml
will override any rust toolchain in the base image. I don't know if we can disable the usage ofrust-toolchain.toml
in the runner and rely only in the installed components ofdocker.io/rust:1.81-slim-bookworm
, I can only find this open issue rust-lang/rustup#2793.What I did in other projects is to ignore the
rust-toolchain.toml
file in a.dockerignore
, as it was triggering this exact same issue while building my images and using a base rust image (https://github.com/jorgehermo9/gq/blob/f6e1efd7e8a73c34c0848a718198436da99f7262/docker/server.Dockerfile#L1) . But this worked because I used theCOPY
command in theDockerfile
and not mounting the vector root dir inside the container.I think this could improve integration tests CI as downloading a whole new rust toolchain every time could take a few seconds
The text was updated successfully, but these errors were encountered: