some-insurance-58590
04/09/2025, 1:15 PMIntrinsicError: Could not identify a process to backtrack to for: Missing digest: Was not present in the local store: Digest { hash: Fingerprint<98b10e5952562b7ff6d281b26e78104b1c0b6cdc224f661bb3276aa1db380d6c>, size_bytes: 51 }some-insurance-58590
04/09/2025, 1:17 PMbrainy-parrot-55558
04/09/2025, 1:21 PMhappy-kitchen-89482
04/10/2025, 2:59 AMhappy-kitchen-89482
04/10/2025, 2:59 AMhappy-kitchen-89482
04/10/2025, 3:00 AMhappy-kitchen-89482
04/10/2025, 3:00 AMhappy-kitchen-89482
04/10/2025, 3:01 AMsome-insurance-58590
04/10/2025, 1:04 PMsome-insurance-58590
05/12/2025, 5:23 PMpants-wrapper.sh script that detects this issue, force kills pantsd, and retries the pants command
#!/usr/bin/env bash
set -euo pipefail
retry_once=false
log_file=$(mktemp -t pants-wrapper-stderr.XXXXXX)
cleanup() {
rm -f "$log_file"
}
trap cleanup EXIT
kill_pantsd() {
# Try pkill first
if command -v pkill &>/dev/null; then
pkill -f 'pantsd \[.*kiid\]' || true
else
# Fallback using ps + awk
ps aux | awk '/pantsd \[.*kiid\]/ { print $2 }' | xargs kill 2>/dev/null || true
fi
}
run_pants() {
pants "$@" 2> >(tee "$log_file" >&2)
}
run_pants "$@" || {
if grep -q "Missing digest: Was not present in the local store" "$log_file" && [ "$retry_once" = false ]; then
echo "Detected missing digest error. Restarting pantsd..." >&2
kill_pantsd
retry_once=true
run_pants "$@"
else
echo "Pants failed without recoverable error." >&2
exit 1
fi
}happy-kitchen-89482
05/12/2025, 7:45 PMsome-insurance-58590
05/12/2025, 7:47 PMpants itself do this? If the pants CLI got the error back, it could kill pantsd & re-run the command
Maybe it tells pantsd to dump it's state to some file & exit, and prints a helpful message about attaching the file to the GH issue? (and then re-runs the command)