From 9d951818b1063cd3b105d498be8ee401af48519a Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Tue, 3 Jun 2025 09:17:50 -0500 Subject: [PATCH 1/3] Debug: Run `sync_dry_run` on infinite loop --- .github/workflows/ci.yml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e29d8743cee05..e902668a05624 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -223,10 +223,13 @@ jobs: - name: "Cargo test" run: | - cargo nextest run \ - --features python-patch \ - --workspace \ - --status-level skip --failure-output immediate-final --no-fail-fast -j 20 --final-status-level slow + while true; do + cargo nextest run \ + sync_dry_run \ + --features python-patch \ + --workspace \ + --status-level fail --failure-output immediate-final --no-fail-fast -j 20 --final-status-level slow + done cargo-test-macos: timeout-minutes: 15 @@ -255,11 +258,14 @@ jobs: - name: "Cargo test" run: | - cargo nextest run \ - --no-default-features \ - --features python,python-managed,pypi,git,performance,crates-io \ - --workspace \ - --status-level skip --failure-output immediate-final --no-fail-fast -j 12 --final-status-level slow + while true; do + cargo nextest run \ + sync_dry_run \ + --no-default-features \ + --features python,python-managed,pypi,git,performance,crates-io \ + --workspace \ + --status-level fail --failure-output immediate-final --no-fail-fast -j 12 --final-status-level slow + done cargo-test-windows: timeout-minutes: 15 @@ -323,7 +329,7 @@ jobs: --no-default-features \ --features python,pypi,python-managed \ --workspace \ - --status-level skip --failure-output immediate-final --no-fail-fast -j 20 --final-status-level slow + --status-level fail --failure-output immediate-final --no-fail-fast -j 20 --final-status-level slow # Get crash dumps to debug the `exit_code: -1073741819` failures (contd.) - name: Analyze crashes From f940d832506f75b037c178fa24c1f50ec38a5cfe Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Tue, 3 Jun 2025 09:50:34 -0500 Subject: [PATCH 2/3] Panic with verbose output on flake --- crates/uv/tests/it/sync.rs | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/crates/uv/tests/it/sync.rs b/crates/uv/tests/it/sync.rs index c2026d51c0fb8..a883ea988a7e4 100644 --- a/crates/uv/tests/it/sync.rs +++ b/crates/uv/tests/it/sync.rs @@ -7879,18 +7879,11 @@ fn sync_dry_run() -> Result<()> { + iniconfig==2.0.0 "###); - uv_snapshot!(context.filters(), context.sync().arg("--dry-run"), @r###" - success: true - exit_code: 0 - ----- stdout ----- - - ----- stderr ----- - Discovered existing environment at: .venv - Resolved 2 packages in [TIME] - Found up-to-date lockfile at: uv.lock - Audited 1 package in [TIME] - Would make no changes - "###); + let output = context.sync().arg("--dry-run").arg("-vv").output()?; + let stderr = String::from_utf8_lossy(&output.stderr); + if stderr.contains("Would replace existing virtual environment") { + panic!("{}", stderr); + }; Ok(()) } From 74864edeb21f5ec29d94f288c18aa95482175e1d Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Mon, 9 Jun 2025 09:18:34 -0500 Subject: [PATCH 3/3] Revert "Debug: Run `sync_dry_run` on infinite loop" This reverts commit f11d11db1b9e2be8e2ff22be32dba48796ceccf5. --- .github/workflows/ci.yml | 26 ++++++++++---------------- crates/uv/tests/it/sync.rs | 8 +++++--- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e902668a05624..e29d8743cee05 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -223,13 +223,10 @@ jobs: - name: "Cargo test" run: | - while true; do - cargo nextest run \ - sync_dry_run \ - --features python-patch \ - --workspace \ - --status-level fail --failure-output immediate-final --no-fail-fast -j 20 --final-status-level slow - done + cargo nextest run \ + --features python-patch \ + --workspace \ + --status-level skip --failure-output immediate-final --no-fail-fast -j 20 --final-status-level slow cargo-test-macos: timeout-minutes: 15 @@ -258,14 +255,11 @@ jobs: - name: "Cargo test" run: | - while true; do - cargo nextest run \ - sync_dry_run \ - --no-default-features \ - --features python,python-managed,pypi,git,performance,crates-io \ - --workspace \ - --status-level fail --failure-output immediate-final --no-fail-fast -j 12 --final-status-level slow - done + cargo nextest run \ + --no-default-features \ + --features python,python-managed,pypi,git,performance,crates-io \ + --workspace \ + --status-level skip --failure-output immediate-final --no-fail-fast -j 12 --final-status-level slow cargo-test-windows: timeout-minutes: 15 @@ -329,7 +323,7 @@ jobs: --no-default-features \ --features python,pypi,python-managed \ --workspace \ - --status-level fail --failure-output immediate-final --no-fail-fast -j 20 --final-status-level slow + --status-level skip --failure-output immediate-final --no-fail-fast -j 20 --final-status-level slow # Get crash dumps to debug the `exit_code: -1073741819` failures (contd.) - name: Analyze crashes diff --git a/crates/uv/tests/it/sync.rs b/crates/uv/tests/it/sync.rs index a883ea988a7e4..602cda7a11d56 100644 --- a/crates/uv/tests/it/sync.rs +++ b/crates/uv/tests/it/sync.rs @@ -7881,9 +7881,11 @@ fn sync_dry_run() -> Result<()> { let output = context.sync().arg("--dry-run").arg("-vv").output()?; let stderr = String::from_utf8_lossy(&output.stderr); - if stderr.contains("Would replace existing virtual environment") { - panic!("{}", stderr); - }; + assert!( + !stderr.contains("Would replace existing virtual environment"), + "{}", + stderr + ); Ok(()) }