From 3cf1eccc8dc5cf508a80fa47a251236862221f4c Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Mon, 3 Mar 2025 14:49:30 -0500 Subject: [PATCH 1/2] chore(host_metrics source): ignore flakey tcp metrics tests (#22544) --- src/sources/host_metrics/tcp.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sources/host_metrics/tcp.rs b/src/sources/host_metrics/tcp.rs index 316d40d087930..c45eb164c11ba 100644 --- a/src/sources/host_metrics/tcp.rs +++ b/src/sources/host_metrics/tcp.rs @@ -273,6 +273,8 @@ mod tests { assert_eq!(*tcp_stats.conn_states.get("syn_recv").unwrap(), 1.0); } + #[ignore] + /// These tests are flakey and need reworking. /// This is a workaround for running these tests serially. /// The `generates_tcp_metrics` test internally calls `fetch_nl_inet_hdrs` and reads /// from the same socket as the `fetches_nl_net_hdrs` test. From e1dce44355c7dcf0b0d0880111a67f15b997b5d4 Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Tue, 4 Mar 2025 09:36:01 -0500 Subject: [PATCH 2/2] fix(ci): `prepare.sh` should install the toolchain (#22572) * fix(ci): prepare.sh override toolchain not installed * update scripts/environment/bootstrap-ubuntu-24.04.sh * need path to be set first * toolchain install is equivalent but better * both scripts need to install, in case prepare.sh is not used, second call will return immediately * also fix 'Build VRL Playground' step * test vrl playground again * this works, move the playground step back to the bottom * add target required by k8s e2e workflow * fix macos: explicitly specify toolchain to install * fix exceptional case: msrv.yml * now that we moved the installation outside bootstrap-ubuntu-24.04, we can remove 'sudo -E' * we can now revert bootstrap-ubuntu-24.04.sh * try a new way to feed active toolchain to the install command --- .github/workflows/k8s_e2e.yml | 1 + .github/workflows/msrv.yml | 3 +++ .github/workflows/test.yml | 1 + scripts/environment/prepare.sh | 4 ++-- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/k8s_e2e.yml b/.github/workflows/k8s_e2e.yml index 70710521b4694..61cdd84090754 100644 --- a/.github/workflows/k8s_e2e.yml +++ b/.github/workflows/k8s_e2e.yml @@ -101,6 +101,7 @@ jobs: - run: sudo -E bash scripts/ci-free-disk-space.sh - run: sudo -E bash scripts/environment/bootstrap-ubuntu-24.04.sh - run: bash scripts/environment/prepare.sh + - run: ~/.cargo/bin/rustup target add x86_64-unknown-linux-gnu - run: echo "::add-matcher::.github/matchers/rust.json" - run: VECTOR_VERSION="$(cargo vdev version)" make package-deb-x86_64-unknown-linux-gnu diff --git a/.github/workflows/msrv.yml b/.github/workflows/msrv.yml index bad4f25cc7cab..18a70126da711 100644 --- a/.github/workflows/msrv.yml +++ b/.github/workflows/msrv.yml @@ -18,5 +18,8 @@ jobs: steps: - uses: actions/checkout@v4 - run: sudo -E bash scripts/environment/bootstrap-ubuntu-24.04.sh + - run: | + # We usually run `scripts/environment/prepare.sh` but in this case we only need the toolchain. + rustup show active-toolchain || rustup toolchain install - run: cargo install cargo-msrv --version 0.15.1 - run: cargo msrv verify diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f12aedad99ddd..c30215f33bf49 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -126,6 +126,7 @@ jobs: if: needs.changes.outputs.source == 'true' || needs.changes.outputs.dependencies == 'true' run: | cd lib/vector-vrl/web-playground/ + ~/.cargo/bin/rustup target add wasm32-unknown-unknown wasm-pack build --target web --out-dir public/pkg # This is a required status check, so it always needs to run if prior jobs failed, in order to mark the status correctly. diff --git a/scripts/environment/prepare.sh b/scripts/environment/prepare.sh index ca8aff9c0d4ec..f7b0f2508516b 100755 --- a/scripts/environment/prepare.sh +++ b/scripts/environment/prepare.sh @@ -3,8 +3,8 @@ set -e -o verbose git config --global --add safe.directory /git/vectordotdev/vector -rustup show # causes installation of version from rust-toolchain.toml -rustup default "$(rustup show active-toolchain | awk '{print $1;}')" +rustup show active-toolchain || rustup toolchain install +rustup show if [[ "$(cargo-deb --version)" != "2.0.2" ]] ; then rustup run stable cargo install cargo-deb --version 2.0.0 --force --locked fi