Repository navigation
feat(trigger-coolify-deploy): cancel stale deploys and alert on failure - #15
Merged
Andreas-Garcia merged 3 commits intoOct 7, 2026
Merged
Conversation
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use the active-deployments endpoint instead of the paginated per-app history, a dedicated stale_deployment_after_seconds threshold above the poll timeout, a null-safe timestamp parse, SSH force-stop of stale in-progress builds, and alert on cancelled jobs too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Andreas-Garcia
deleted the
feature/coolify-deploy-stale-cancel-and-alert
branch
October 8, 2026 02:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A Coolify deployment whose job dies mid-run stays
queued/in_progressforever. Coolify runs one deployment per app, so every later trigger is silently dropped and the poll 404s until timeout. This happened on staging (stuck worker deploy, ~hours of stale code) and nothing alerted, because a failed deploy step is only a red run on GitHub.Changes
trigger-coolify-deploy: before triggering, list the app's deployments (filtered to this PR / the main app) and cancel anyqueued/in_progressone older thanpoll_timeout_seconds.discord_webhook_urlinput: posts a Discord embed (app, env, repo@ref, sha, run link) when the action fails. Backwards-compatible: empty by default.tests/stale_deployment_filter.sh: regression test for the jq filter (both timestamp formats, PR scoping, status filtering), wired intotest-actions.yml.[Unreleased]; READMEpoll_timeout_secondsdefault corrected from 900 to 1800.Test plan
bash tests/stale_deployment_filter.shandtests/deployment_uuid_format.shpass locallytest-actionsdiscord_webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}🤖 Generated with Claude Code