Skip to content

Commit f16883c

Browse files
authored
Merge pull request #145 from durable-workflow/release/cli-2.8.0
Prepare 2.8.0: workflow update outcome reads
2 parents fd96bf6 + e708bc3 commit f16883c

3 files changed

Lines changed: 57 additions & 2 deletions

File tree

‎docs/release-notes/2.8.0.md‎

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
Durable Workflow CLI 2.8.0
2+
3+
## Read an update's outcome later
4+
5+
2.8.0 adds `dw workflow:update-outcome` for native Server 3.6.0's update
6+
outcome reads (server#1131, durable-workflow/.github#212, cli#144). When
7+
`dw workflow:update` returns before the update finishes, for example after its
8+
`--wait=completed` wait runs out, you can read the outcome later by update id
9+
instead of sending the update again.
10+
11+
```bash
12+
dw workflow:update-outcome order-123 01JUPDATE00000000000000000
13+
dw workflow:update-outcome order-123 01JUPDATE00000000000000000 --wait=completed --wait-timeout=30
14+
```
15+
16+
- **One read, never a resend.** The command sends one
17+
`GET /api/workflows/{workflow_id}/updates/{update_id}`. It never sends a
18+
POST and never submits the update again.
19+
- **Pending is not null.** A 202 `accepted` answer prints "Update accepted,
20+
not finished yet" with a hint to run again with `--wait=completed`. A
21+
completed update prints its `result_envelope`, even when it encodes null.
22+
- **Final outcomes keep their exit codes.** A failed update exits 2 with the
23+
Server's `failure_message`, as `workflow:update` does. A rejected update
24+
keeps its original rejection status. An unknown or pruned update id
25+
(404 `update_not_found`) exits 5; that does not prove the update was never
26+
admitted.
27+
- **`--wait`** is `accepted` (the default, answers at once) or `completed`.
28+
**`--wait-timeout`** needs `--wait=completed` and a whole number of seconds
29+
of at least 1. Bad values send nothing.
30+
- **`--json`** returns the Server receipt with `namespace` added. Nothing is
31+
printed until the receipt is checked against the requested workflow and
32+
update ids.
33+
- **`workflow:update`** now prints the matching `workflow:update-outcome`
34+
command after an accepted but unfinished update, only when the Server
35+
advertises the capability.
36+
37+
The command needs a Server that advertises
38+
`capabilities.update_outcome_reads` (native 3.6.0 or later). Against any other
39+
Server, including published PHP Server 2.x, it exits with code 8 before sending
40+
anything, and `workflow:update` output is unchanged. The new command makes
41+
abbreviations such as `workflow:upd` ambiguous; the exact name
42+
`workflow:update` still resolves.
43+
44+
## Release builds
45+
46+
Every Linux job that reaches `setup-php`, in CI and in the release workflows,
47+
now turns off APT retries first (cli#143, durable-workflow/.github#295). This
48+
changes how release artifacts are built, not what they contain.
49+
50+
## Unchanged
51+
52+
Every other command behaves as in 2.7.0. A parity suite still compares `dw`
53+
with the 2.x CLI on every change, offline and against published PHP Server
54+
2.11.8 and native Servers 3.0.5 and 3.5.0. The 2.3.x PHAR line receives
55+
security fixes only until 2027-02-28.

‎rust/Cargo.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎rust/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "dw"
3-
version = "2.7.0"
3+
version = "2.8.0"
44
edition = "2021"
55
rust-version = "1.86"
66
description = "Command-line interface for Durable Workflow Server and Cloud"

0 commit comments

Comments
 (0)