Skip to content
Merged
Show file tree
Hide file tree
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
34 changes: 34 additions & 0 deletions docs/cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,12 @@ dw task-queue:resume orders --build-id build-2026.04.20-a3f
dw task-queue:pause-activities orders --reason="payments vendor outage"
dw task-queue:activity-dispatch orders
dw task-queue:resume-activities orders

# Inspect and retire an old worker build, or a whole queue (native Server 3.14.0+)
dw task-queue:retirement orders --build-id build-2026.04.20-a3f
dw task-queue:retire orders --build-id build-2026.04.20-a3f --expected-revision=sha256:...
dw task-queue:retirement orders
dw task-queue:retire orders
```

An activity dispatch pause holds every new activity lease on one task queue
Expand All @@ -722,6 +728,34 @@ as published PHP Server 2.x, `dw` refuses with exit 8 before sending the
request. `task-queue:describe` and `task-queue:list` show the activity
dispatch state when the Server reports it, and print nothing new otherwise.

`task-queue:retirement` is a read-only inventory of everything that still
depends on one build (`--build-id` or `--unversioned`) or, without either, on
every cohort of the queue (Server #519): open runs pinned to it (including
waiting, continued and child runs), ready, leased and delayed tasks (activity
retries and timers), open activities, pending update validations, schedules
(queue scope only), and unattributed open runs, which make the inventory
incomplete. Each blocker has its exact count, up to 20 sample identities and a
recovery action. When `Retirable` is `yes`, the output prints the matching
`task-queue:retire` command bound to `observation.inventory_revision`.

`task-queue:retire` sends one guarded retire request and never resends it. The
Server repeats the inventory inside the serialized transition and records
retirement only when it is empty: the build is never selected for new starts
again and its workers are marked draining; run pins, activity queues and
history are unchanged. A refusal is HTTP 409 and changes nothing; `dw` prints
the reason (`selected_for_new_starts`, `inventory_incomplete`,
`live_dependencies`, `inventory_changed`, `unknown_deployment` or
`unknown_task_queue`), each blocker with its sample and recovery, and the
Server's `expected_resolution`, and exits 2. `--expected-revision` refuses the
retire with `inventory_changed` if anything the inspection observed has
changed. `--json` returns the Server payload; a refusal keeps the usual error
envelope with the full body in `server_response`.

Unlike `task-queue:drain`, which stops a build's polls immediately whether or
not work is still pinned to it, retirement waits for that work. Both commands
need a Server that advertises `capabilities.worker_build_retirement`; on any
other Server `dw` refuses with exit 8 before sending the request.

### Worker Protocol Diagnostics

```bash
Expand Down
1 change: 1 addition & 0 deletions rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ command is ported.
| `--tls-verify=false` against HTTPS: no certificate or hostname checks, as in 2.x, plus a stderr warning on every such command (also with `--json` and `-q`) | Ported, intentional addition |
| `batch:cancel`, `batch:signal`, `batch:update`, `batch:show`, `batch:resume`: resumable bulk operations with a private manifest and an optional `--deadline` ([runbook](../docs/batch-operations.md), cli#60). `parity/live_batch.py` runs them against the published Servers in CI | Rust-only, new |
| `task-queue:pause-activities`, `task-queue:resume-activities`, `task-queue:activity-dispatch`: pause, resume and read activity dispatch on one task queue (Server #577), one request each after checking cluster info for `capabilities.task_queue_activity_dispatch_pause`; `task-queue:describe` and `task-queue:list` show the state when the Server reports it | Rust-only, new |
| `task-queue:retirement`, `task-queue:retire`: inspect what still depends on one worker build (`--build-id`, `--unversioned`) or a whole task queue, and retire it only when nothing does (Server #519), one request each after checking cluster info for `capabilities.worker_build_retirement`; `--expected-revision` binds the retire to an inspected inventory, and a 409 refusal (nothing changed) prints its blockers, recovery and expected resolution and exits 2 | Rust-only, new |
| `workflow:update-outcome`: read an update's outcome later by its update ID (Server #1131, durable-workflow/.github#212), one GET after checking cluster info for `capabilities.update_outcome_reads`; pending, completed (including a null result), failed (exit 2), rejected and `update_not_found` (exit 5) are reported distinctly, and the update is never sent again. `workflow:update` points an unfinished update at it when the Server advertises the capability | Rust-only, new |

Server calls go through the `durable-workflow` crate. The unreleased native
Expand Down
Loading
Loading