Visitar URL original
fix(ci): fail the promote wait on a digest lookup error instead of retrying it by waleedlatif1 · Pull Request #9430 · simstudioai/sim · GitHub
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(ci): fail the promote wait on a digest lookup error instead of re…
…trying it
  • Loading branch information
waleedlatif1 committed Oct 29, 2026
commit 0c81d5e306ecf93e54b22a52a00d9daa48c7d35c
5 changes: 4 additions & 1 deletion .github/scripts/promote-app-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ DIGEST="sha256:$(printf '%s' "$MANIFEST" | sha256sum | cut -d' ' -f1)"
EPOCH=$(date +%s)
bash "$SCRIPT_DIR/promote-image.sh" "$REGISTRY" "$REPOSITORY" "$SOURCE_TAG" "$DEPLOY_TAG" "$RELEASE_TAG"
deadline=$(( $(date +%s) + 60 ))
until [ "$(bash "$SCRIPT_DIR/get-ecr-image-digest.sh" "$REPOSITORY" "$DEPLOY_TAG" --allow-missing)" = "$DIGEST" ]; do
while true; do
# Assigned, not tested in the loop condition, so a failed lookup stops the script under set -e.
CURRENT=$(bash "$SCRIPT_DIR/get-ecr-image-digest.sh" "$REPOSITORY" "$DEPLOY_TAG" --allow-missing)
[ "$CURRENT" = "$DIGEST" ] && break
if [ "$(date +%s)" -ge "$deadline" ]; then
echo "ERROR: $DEPLOY_TAG did not resolve to the pushed $DIGEST within 60s; cutover cannot be correlated" >&2
exit 1
Expand Down
Loading