Debug logging causes panic while looking for secrets to redact #12459
Closed
Description
A cargo metadata
call spuriously causes a panic while downloading dependencies, possibly during a time of intermittent network issues on GitHub. The panic is in some cargo debug logging code that is attempting to redact secret information like cookies as headers are being logged.
Error:
thread 'main' panicked at 'byte index 14 is not a char boundary; it is inside 'ꓦ' (bytes 12..15) of `>iꓦ>iꓦ>iꓦ>iꓦ>iꓦ>i`', src/cargo/ops/registry.rs:715:17
The line in question:
cargo/src/cargo/ops/registry.rs
Line 715 in c0eb6cc
Log file:
error.log
Similar issues here:
https://github.com/libp2p/rust-libp2p/actions/runs/5782756485/job/15670482772#step:41:715
https://github.com/libp2p/rust-libp2p/actions/runs/5782750882/job/15670392407
Underlying cause of: obi1kenobi/cargo-semver-checks#513