Skip to content

Integration tests runner downloads rustc again #21923

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

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

Integration tests runner downloads rustc again #21923

jorgehermo9 opened this issue Nov 30, 2024 · 10 comments
Labels
domain: ci Anything related to Vector's CI environment domain: dev Anything related to Vector's development 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.

@jszwedko jszwedko added the domain: dev Anything related to Vector's development environment label Dec 2, 2024
@jorgehermo9
Copy link
Contributor Author

jorgehermo9 commented Mar 3, 2025

I think this would get fixed with rustup 1.28. It not longer installs the toolchain by default (you have to execute rustup toolchain install)

https://blog.rust-lang.org/2025/03/02/Rustup-1.28.0.html

@pront
Copy link
Member

pront commented Mar 3, 2025

Thanks @jorgehermo9, I am taking a look. Unfortunately the ubuntu 24.0 runner does not include 1.28.0.

@Bogay
Copy link

Bogay commented Mar 12, 2025

it has rustup 1.28.1 now

actions/runner-images@3c122d2#diff-cc12e5c5d005932feaacf280af949d83e2cb6020dff8203d9ead2e00c30e8b7fR138

@pront
Copy link
Member

pront commented Mar 12, 2025

Neat @Bogay, @jorgehermo9 can you confirm if we can close this ticket now?

@jorgehermo9
Copy link
Contributor Author

let me check on local! I will try ASAP

@jorgehermo9
Copy link
Contributor Author

jorgehermo9 commented Mar 12, 2025

but rustup 1.28.1 rollbacked the auto-installing behaviour to pre-1.28.0.. So if nothing changed, the behavior would be the same as before.. But will try it on master anyway

@jorgehermo9
Copy link
Contributor Author

I'm afraid that this is still happening

Image

ran cargo vdev integration test postgres on master.

@pront
Copy link
Member

pront commented Mar 17, 2025

Thank you for checking @jorgehermo9, if you want to take a crack at this please go ahead. I am afraid we have more pressing issues to focus on for the next few months.

@jorgehermo9
Copy link
Contributor Author

jorgehermo9 commented Mar 17, 2025

No problem @pront, thank you for your help.

I am afraid we have more pressing issues to focus on for the next few months.

Understandable, this is really a minor issue and just a little improvement so I wouldn't prioritize it either. I can take a deeper look into it in a few days/weeks

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 domain: dev Anything related to Vector's development environment
Projects
None yet
Development

No branches or pull requests

4 participants