You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo "::error::could not determine crates.io status while checking ordvec ${VERSION} at $STATIC_URL (curl exit ${STATIC_CURL_EXIT}). Refusing recovery."
if [ "$STATIC_CURL_EXIT" -eq 0 ] && [ "$STATIC_STATUS" = 200 ]; then
1157
+
downloaded=true
1158
+
break
1159
+
fi
1160
+
1161
+
rm -f "$EXISTING"
1162
+
echo " waiting for crates.io to serve ordvec ${VERSION} for recovery (${i}/12)..."
1163
+
if [ "$i" != 12 ]; then sleep 5; fi
1164
+
done
1165
+
1166
+
if [ "$downloaded" != true ]; then
1167
+
API_DETAIL="status ${API_STATUS:-unset}"
1168
+
STATIC_DETAIL="status ${STATIC_STATUS:-unset}"
1169
+
if [ "${API_CURL_EXIT:-0}" -ne 0 ]; then API_DETAIL="curl exit ${API_CURL_EXIT}"; fi
1170
+
if [ "${STATIC_CURL_EXIT:-0}" -ne 0 ]; then STATIC_DETAIL="curl exit ${STATIC_CURL_EXIT}"; fi
1171
+
echo "::error::crates.io metadata lists ordvec ${VERSION}, but recovery endpoints did not serve the .crate after retries (API ${API_DETAIL}, static ${STATIC_DETAIL}). Refusing recovery."
1131
1172
exit 1
1132
1173
fi
1133
-
case "$STATIC_STATUS" in
1134
-
200)
1135
-
already_present=true
1136
-
;;
1137
-
404)
1138
-
rm -f "$EXISTING"
1139
-
;;
1140
-
*)
1141
-
echo "::error::unexpected crates.io status ${STATIC_STATUS} while checking ordvec ${VERSION} at $STATIC_URL. Refusing recovery."
1142
-
exit 1
1143
-
;;
1144
-
esac
1145
1174
fi
1146
1175
1147
-
if [ "$already_present" = true ]; then
1176
+
if [ "${downloaded:-false}" = true ]; then
1148
1177
E_SHA=$(sha256sum "$EXISTING" | cut -d' ' -f1)
1149
1178
echo "attested: $A_SHA"
1150
1179
echo "crates.io-served: $E_SHA"
@@ -1154,9 +1183,6 @@ jobs:
1154
1183
fi
1155
1184
echo "already_published=true" >> "$GITHUB_OUTPUT"
1156
1185
echo "::notice::crates.io already serves byte-identical ordvec ${VERSION}; skipping upload and verifying served bytes."
echo "::error::could not determine crates.io status while checking ordvec-manifest ${VERSION} at $API_URL (curl exit ${API_CURL_EXIT}). Refusing recovery."
echo "::error::could not determine crates.io status while checking ordvec-manifest ${VERSION} at $STATIC_URL (curl exit ${STATIC_CURL_EXIT}). Refusing recovery."
if [ "$STATIC_CURL_EXIT" -eq 0 ] && [ "$STATIC_STATUS" = 200 ]; then
1534
+
downloaded=true
1535
+
break
1536
+
fi
1537
+
1538
+
rm -f "$EXISTING"
1539
+
echo " waiting for crates.io to serve ordvec-manifest ${VERSION} for recovery (${i}/12)..."
1540
+
if [ "$i" != 12 ]; then sleep 5; fi
1541
+
done
1542
+
1543
+
if [ "$downloaded" != true ]; then
1544
+
API_DETAIL="status ${API_STATUS:-unset}"
1545
+
STATIC_DETAIL="status ${STATIC_STATUS:-unset}"
1546
+
if [ "${API_CURL_EXIT:-0}" -ne 0 ]; then API_DETAIL="curl exit ${API_CURL_EXIT}"; fi
1547
+
if [ "${STATIC_CURL_EXIT:-0}" -ne 0 ]; then STATIC_DETAIL="curl exit ${STATIC_CURL_EXIT}"; fi
1548
+
echo "::error::crates.io metadata lists ordvec-manifest ${VERSION}, but recovery endpoints did not serve the .crate after retries (API ${API_DETAIL}, static ${STATIC_DETAIL}). Refusing recovery."
1482
1549
exit 1
1483
1550
fi
1484
-
case "$STATIC_STATUS" in
1485
-
200)
1486
-
already_present=true
1487
-
;;
1488
-
404)
1489
-
rm -f "$EXISTING"
1490
-
;;
1491
-
*)
1492
-
echo "::error::unexpected crates.io status ${STATIC_STATUS} while checking ordvec-manifest ${VERSION} at $STATIC_URL. Refusing recovery."
1493
-
exit 1
1494
-
;;
1495
-
esac
1496
1551
fi
1497
1552
1498
-
if [ "$already_present" = true ]; then
1553
+
if [ "${downloaded:-false}" = true ]; then
1499
1554
E_SHA=$(sha256sum "$EXISTING" | cut -d' ' -f1)
1500
1555
echo "attested: $A_SHA"
1501
1556
echo "crates.io-served: $E_SHA"
@@ -1505,9 +1560,6 @@ jobs:
1505
1560
fi
1506
1561
echo "already_published=true" >> "$GITHUB_OUTPUT"
1507
1562
echo "::notice::crates.io already serves byte-identical ordvec-manifest ${VERSION}; skipping upload and verifying served bytes."
0 commit comments