Repository navigation
Skip cargo shapes on a failed --precise pin, with cargo stderr - #1666
Conversation
pin_patched_versions asserted when `cargo update --precise` failed and dropped cargo's stderr, so a crates.io blip during fixture setup failed the suite with only "cannot lock cfg-if@1.0.4" and the lock text (seen in test-release (2) of run 39745825228). generate-lockfile and the baseline build already soft-skip on the same class of failure. Return the failure with each `cargo update` stderr instead and route it through cargo_e2e_matrix::skip: optional legs (coverage, test-release) skip with the cause printed, while the required lock-v* legs still fail on it, now with cargo's error in the panic. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WKXDFSSDxDgdAGiUGLKWQB
|
bugbot run Generated by Claude Code |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 07c2698. Configure here.
|
Labeled Ready for review at
Generated by Claude Code |
Final review briefWhat it does. Test-only change. In the cargo "shapes" e2e suite, a failed Risk: low. One test file. No product code changes. It reuses the skip path that Look here
Verified
Changes I made: none. Open questions: none blocking. One nit: when several candidates fail, their stderr strings are joined without a separator. This affects only the readability of a rare message. Auto-merge is armed, so approving sends this straight to the merge queue. Generated by Claude Code |
Problem
test-release (2)failed in the full-scope run 39745825228 (job 119714465566). That run madeci-okred for #1663's head. The failing test wascargo_hosted_refuses_a_lockless_project_with_other_dependencies, and the message gave no cause:The project has no lockfile, so
generate-lockfileresolves the newestcfg-if(1.0.5).pin_patched_versionsthen runscargo update -p cfg-if@1.0.5 --precise 1.0.4. That command returned non-zero, but its stderr was dropped. The pin works fine locally, and the full suite passes (33/33). So the likely cause is a transient index fetch in the freshCARGO_HOME, the same blip class as #1459 and #1654. The log can't confirm it.The same suite runs in
coverage, which gatesci-okand the merge queue. There, one such blip during fixture setup evicts the queue entry.Root cause
Fixture setup already soft-skips when cargo can't reach crates.io: a failed
generate-lockfileand a failed baselinecargo buildboth go throughcargo_e2e_matrix::skip. The--precisepin is the same kind of network-dependent setup step, but it hard-asserted and dropped cargo's error.Fix
pin_patched_versionsnow returnsErrcarrying each failedcargo update's stderr, andrun_shapepasses that tocargo_e2e_matrix::skip:coverage,test-release) skip, with the cause printed.lock-v*legs (SOCKET_PATCH_CARGO_E2E_REQUIRED=1, ci.yml:2397-2410, which run this suite) still fail on it. The panic now includes cargo's error.This complements #1654, which widens
CARGO_NET_RETRYunderCI. That change makes blips rarer; this one makes a remaining blip skip on optional legs and makes any failure readable. The two PRs touch different files.Proof
cargo test -p socket-patch-cli --test e2e_redirect_cargo_shapes: 33 passed.cargoshim on PATH that fails onlyupdatewith a simulated download error:SKIP e2e_redirect_cargo_shapes (lockless-other-dependencies): cannot lock cfg-if@1.0.4 (crates.io unreachable?): \cargo update -p cfg-if@1.0.5`: error: failed to download ... (simulated blip)`, and the test passes as a skip.SOCKET_PATCH_CARGO_E2E_REQUIRED=1: the test panics with the same text plus(and SOCKET_PATCH_CARGO_E2E_REQUIRED is set, so this leg must not skip).rustfmtwas run on the touched file.cargo clippy -p socket-patch-cli --test e2e_redirect_cargo_shapes -- -D warningsis clean.No tests were removed or moved. Every shape still runs everywhere it ran before.
https://claude.ai/code/session_01WKXDFSSDxDgdAGiUGLKWQB
Generated by Claude Code