Skip to content

2.5.0

Choose a tag to compare

@github-actions github-actions released this 12 Nov 00:28
· 115 commits to main since this release
Immutable release. Only release title and notes can be modified.
277df0c

Durable Workflow CLI 2.5.0

dw.phar is no longer published

2.5.0 ships no PHAR. If you run php dw.phar, switch to the standalone binary, which needs no PHP. Then delete dw.phar.

The 2.3.x PHAR line receives security fixes only until 2027-02-28 and is unsupported after that date.

# Linux and macOS
curl -fsSL https://github.com/durable-workflow/cli/releases/latest/download/install.sh | sh
# Windows
irm https://github.com/durable-workflow/cli/releases/latest/download/install.ps1 | iex

The installers check the binary against the release's SHA256SUMS before installing it.

If you don't pipe scripts into a shell, download the release and verify it first:

mkdir release
gh release download 2.5.0 --repo durable-workflow/cli --dir release
sh release/verify-release.sh --attest release/   # checksums plus GitHub attestations
install -m 0755 release/dw-linux-x86_64 ~/.local/bin/dw   # pick your platform's asset
# Windows: download, verify, then copy (no script is run)
New-Item -ItemType Directory -Force release | Out-Null
gh release download 2.5.0 --repo durable-workflow/cli --dir release
if ($LASTEXITCODE -ne 0) { throw 'gh release download failed' }
$expected = ((Select-String -Path release\SHA256SUMS -Pattern ' dw-windows-x86_64\.exe$').Line -split '\s+')[0]
$actual = (Get-FileHash release\dw-windows-x86_64.exe -Algorithm SHA256).Hash.ToLower()
if ($actual -ne $expected) { throw 'dw-windows-x86_64.exe does not match SHA256SUMS' }
gh attestation verify release\dw-windows-x86_64.exe --repo durable-workflow/cli --signer-workflow durable-workflow/cli/.github/workflows/release-rust.yml --deny-self-hosted-runners
if ($LASTEXITCODE -ne 0) { throw 'dw-windows-x86_64.exe failed attestation verification' }
New-Item -ItemType Directory -Force "$env:LOCALAPPDATA\Programs\dw" | Out-Null
Copy-Item release\dw-windows-x86_64.exe "$env:LOCALAPPDATA\Programs\dw\dw.exe"

Add %LOCALAPPDATA%\Programs\dw to your PATH if it isn't there already.

dw upgrade in a 2.x PHAR install still answers "Download the matching PHAR manually". That message comes from the old release and can't be changed: use the commands above instead.

Standalone-binary installs upgrade as usual with dw upgrade.

Intel Macs: 2.5.0 adds dw-macos-x86_64. Published 2.x dw upgrade finds no Intel macOS asset, and install.sh does not install it yet, so on an Intel Mac use the verified download above with dw-macos-x86_64, or install the release's Homebrew formula dw.rb through a local tap (brew tap-new --no-git "$USER/local", copy dw.rb into its Formula/ directory, then brew install "$USER/local/dw"). Later releases upgrade with dw upgrade.

The CLI is now written in Rust

dw is now a native Rust program built on the published durable-workflow Rust SDK. It replaces the PHP implementation.

Unchanged:

  • Commands, options, output and exit codes: they match 2.x. A parity suite compares this release byte for byte against the 2.x CLI, offline and against published PHP Server 2.11.8 and native Servers 3.0.5 and 3.5.0.
  • Asset names and install channels: dw-linux-x86_64, dw-linux-aarch64, dw-macos-aarch64, dw-windows-x86_64.exe, install.sh, install.ps1, verify-release.sh, the Homebrew formula dw.rb and SHA256SUMS. New in 2.5.0: dw-macos-x86_64 for Intel Macs, which the Homebrew formula now uses.
  • Upgrades: 2.x standalone binaries upgrade to 2.5.0 with dw upgrade.

Every asset carries a GitHub build-provenance attestation. Linux binaries are statically linked.

dw-<platform>.dependencies.json now lists the Rust packages linked into each binary (schema durable-workflow.cli.rust-dependencies/v1), not the PHP runtime inventory.

Intentional differences from 2.x

  • runtime:check: the hidden packaging check reports the native binary's version, commit, build date and compilation target, and exits 0 when it runs successfully. Its output and help replace the PHP runtime and extension report from 2.x.
  • Connection URLs: runtime base URLs containing user information, queries, fragments or whitespace are refused before a request. Use token options or profile token references for authentication.
  • Doctor output: human diagnostics show untrusted formatter markup literally and escape terminal controls and embedded line breaks, like the other commands' human output. Machine JSON retains Server data as structurally encoded values.
  • Shell completion: generating a script requires an executable name made of ASCII letters, digits, dots, underscores and hyphens, starting with a letter or underscore. Unsafe names are refused before any shell code is emitted. Completion debug logs now use a private completion directory alongside the CLI config file, and refuse unsafe log entries instead of following temporary-file links.
  • Prompting without a terminal: 2.x treated a non-terminal stdin as interactive and printed a "Do you want to run … instead?" prompt to stdout before exiting 1. 2.5.0 prompts only on a terminal; otherwise it reports the error on stderr, as 2.x did with -n.
  • --format=xml: this works in the standalone binary. The 2.x standalone binary failed with a PHP fatal error, because it lacked the DOM extension. The output matches the 2.x PHAR.
  • IDs and names in request paths: these are now percent-encoded. 2.x inserted workflow IDs, signal, query and update names and similar values into the URL unencoded, so a value containing /, ?, #, % or a space reached the wrong route. Values made only of letters, digits and -._~ are sent unchanged.
  • Empty and dot IDs: an empty ID or name, . or .. is refused with exit 2 before any request. In 2.x these produced a different URL.
  • Redirects: dw makes one attempt to the configured URL and refuses an HTTP redirect instead of following it. A redirect is never reported as a completed command. Use the Server's actual URL.
  • Commands that change state are sent once: a start, signal, update, cancel, terminate, schedule, namespace, worker or task change is never retried automatically. When the response is lost the command exits 3 and says the outcome is unknown. For signals and updates the error names the request ID, and the next steps say to check workflow history and command receipts before retrying with the same ID.
  • --tls-verify=false: this works against HTTPS as in 2.x, and every command that connects this way now also prints one warning on stderr, also with --json and -q.
  • Server text in human output: messages, names and values from the Server are printed as text. Console markup in them is shown literally, and terminal control characters and line breaks are escaped. Machine JSON and JSONL keep the Server's values unchanged.
  • Command keys for signals and updates: workflow:signal and workflow:update send a request ID: --request-id, or one generated per invocation as cli-signal-… or cli-update-…. The ID is printed with the result and included in error output. This follows the 2.x source after 2.3.x (cli#61); published 2.3.x sent signals without a key.
  • Validation errors with --json: an invalid --status or similar canonical option value returns the structured JSON error with exit 2. Published 2.3.x wrote these to stderr.
  • workflow:list-runs: prints one Server response page and leaves its next_page_token for the caller. It refuses a response that names a different workflow or operation.
  • Malformed Server responses: where 2.x printed a PHP warning or a PHP type error naming its internal source path, dw prints the line with an empty value, or an error that names the malformed field.