Stu Mason · Folkestone, Kent
One entryClosed issue· StuMason/coolify-mcp· TypeScript

Issue #238 closed: deploy: add wait option to poll deployment to terminal status

Split from #237 (item 1).

Motivation

A webhook deploy failed silently (build container OOM-killed, exit 255) while the old container kept serving — the app looked fine, the deploy was dead. The deploy tool returns a deployment_uuid and walks away, so an agent that deploys without watching ships "site 200 = deployed" false positives.

Proposal

Add wait: boolean (default false) and optional timeout_seconds (default ~300) to the deploy tool:

  1. Trigger deploy as today, capture deployment_uuid.
  2. Poll getDeployment(uuid) every ~5s until terminal status (finished / failed / cancelled) or timeout.
  3. On failure, include the tail of the build logs (reuse truncateLogs) so the caller sees why without a second call.
  4. On timeout, return current status + the deployment UUID and a next-action hint to keep polling via deployment get.

Response must stay small: status, timings, and a bounded log tail on failure only — never the raw upstream payload (see #232).

Acceptance

  • deploy {tag_or_uuid, wait: true} returns final status; on failure includes a bounded log tail.
  • Timeout path is explicit and actionable.
  • Tests for success, failure, and timeout paths.