Skip to content

Track and cancel operations

Re-attach to, inspect and cancel the long-running operations that alis define, alis build, alis deploy and alis blocks install start.

Prerequisites

  • An operation name such as operations/0f6b.... Commands print it when run with --async, and the final result of a waited command carries it under name.

List recent operations

alis operations list

The CLI keeps a local record of operations it started on this machine; operations started elsewhere do not appear. Each row shows name, type (define, build, deploy), target (the package id), startedAt and the exact next command to wait on it. --limit caps the rows (default 20). --active polls each operation and prints the running and unreadable ones; an unreadable status is not evidence that the operation stopped.

Wait for an operation

alis operations wait operations/<id>

Progress streams to stderr and the finished operation prints to stdout, exactly as the starting command would have done. --timeout 15m stops waiting while the operation keeps running; the last stderr event names the next command to resume. --quiet hides progress; --poll-interval changes the polling rate.

Pressing CtrlC stops the wait only. The operation continues on the platform; re-attach with the same command.

Check the state once

alis operations describe operations/<id> --json

Prints the operation as it is now: done, status (running, succeeded, failed), version, notes, logsUri and the images[] or deployments[] in progress.

Cancel a build

alis operations cancel operations/<id>

Only build executions can be cancelled; deployments cannot. The result reports stopped. Start replacement work only once stopped is true. Add --package <pkg> when the operation is not in the local record.