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

Integration tests runner downloads rustc again #21923

Open
jorgehermo9 opened this issue Nov 30, 2024 · 0 comments
Open

Integration tests runner downloads rustc again #21923

jorgehermo9 opened this issue Nov 30, 2024 · 0 comments

Comments

@jorgehermo9
Copy link
Contributor

jorgehermo9 commented Nov 30, 2024

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 container

&format!("{}:{MOUNT_PATH}", app::path()),
and that directory contains the 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 container
const TEST_COMMAND: &[&str] = &[

as seen in the following screenshot:

image

see the "downloadin 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 of rust-toolchain.toml in the runner and rely only in the installed components of docker.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 the COPY command in the Dockerfile 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant