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 · 1 comment
Open

Integration tests runner downloads rustc again #21923

jorgehermo9 opened this issue Nov 30, 2024 · 1 comment
Labels
domain: ci Anything related to Vector's CI environment

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 "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 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

@pront pront added the domain: ci Anything related to Vector's CI environment label Dec 2, 2024
@pront
Copy link
Member

pront commented Dec 2, 2024

Hi @jorgehermo9, thank you for creating this issue. Hm, we probably should use whatever the base image provides. Not sure if there's a more elegant way to fix this, but we have some options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: ci Anything related to Vector's CI environment
Projects
None yet
Development

No branches or pull requests

2 participants