Skip to content

fix(trigger-coolify-deploy): guard collateral-cancel status query - #12

Merged
Andreas-Garcia merged 1 commit into
mainfrom
fix/trigger-coolify-deploy-mine-status-guard
Sep 15, 2026
Merged

Andreas-Garcia merged 1 commit into
mainfrom
fix/trigger-coolify-deploy-mine-status-guard

Conversation

@Andreas-Garcia

Copy link
Copy Markdown
Member

Summary

  • After cancel_phantom_builds() cancels a native build, the follow-up mine_status=$(curl -sf ...) check (to detect whether that collaterally cancelled our own just-queued deployment) had no error handling, unlike the near-identical query inside cancel_phantom_builds() itself.
  • Under the script's top-level set -euo pipefail, a non-2xx response from that GET (curl exit 22) hard-failed the whole deploy step instead of gracefully falling through.
  • Found while diagnosing PR #253 in the-music-deck-admin's "Deploy API (preview)"/"Deploy showcase" checks failing with Process completed with exit code 22 right after Deployment queued: ... / Checking for a still-running native (webhook-triggered) preview build to stop....

Changes

  • Wrap the mine_status query in set +e / capture exit status / set -e, same pattern as cancel_phantom_builds()'s own query.
  • On query failure, log a warning and treat mine_status as empty (i.e. assume not collaterally cancelled) rather than aborting.
  • Changelog entry under [Unreleased] / Fixed.

Test plan

  • Script-only error-handling fix, no new testable behavior beyond existing coverage.
  • Will re-trigger PR #253's "Deploy API (preview)" / "Deploy showcase" checks against this fix once merged/tagged to confirm the step no longer hard-fails on this call.

…h set +e

The mine_status curl call after cancel_phantom_builds() was unprotected,
so a non-2xx response (curl exit 22) under set -euo pipefail hard-failed
the whole deploy step instead of being treated as "not collaterally
cancelled", matching how cancel_phantom_builds()'s own query already
handles this.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Andreas-Garcia
Andreas-Garcia merged commit 4234931 into main Sep 15, 2026
1 check passed
@Andreas-Garcia
Andreas-Garcia deleted the fix/trigger-coolify-deploy-mine-status-guard branch September 15, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant