Skip to content

Workflow 2.35.0

Latest

Choose a tag to compare

@rmcdaniel rmcdaniel released this 20 Nov 03:49
8d83a70

2.35.0 has no database migration. It adds experimental durable
signal-external for embedded workflow code (.github#223); the API may change
incompatibly in a minor release, never in a patch release, as
docs/api-stability.md#durable-signal-external explains. Upgrade note:
request IDs starting with workflow-signal: are now reserved, and a signal or
signal-with-start that uses one is refused (422 request_id_reserved from the
control plane and signal webhooks). Callers that already use that prefix must
choose another before upgrading; see the first entry below.

  • Experimental durable signal-external (.github#223): embedded workflow code
    can signal another workflow in its namespace with
    signalExternalWorkflow($workflowId, $signalName, $arguments, $runId) (also
    Workflow::signalExternalWorkflow()), or its child with
    ChildWorkflowHandle::signalDurably(), and receives an
    ExternalSignalResult. Delivery is an outbox: the sending task records
    ExternalSignalRequested and commits, touching only its own run. Delivery
    then admits an ordinary signal on the target in the target's own
    transaction, keyed workflow-signal:<sender run>:<sequence> and attributed
    through CommandContext::workflow(), and appends one
    ExternalSignalDelivered or ExternalSignalFailed to the sender, which
    resumes in a new workflow task. Deadlocks, lock timeouts and lost
    connections are retried without limit and never fail the sender; one
    delayed sender task re-attempts a pending delivery after a crash. Other
    delivery errors stop after
    workflows.v2.external_signal.max_delivery_failures (default 10) with
    ExternalSignalFailed reason delivery_failed, and the run summary shows
    external_signal_delivery_retrying with the attempt count and last error
    meanwhile. Replay returns the recorded
    outcome and never sends again. A missing, closed or refusing target is a
    returned outcome (target_not_found, target_closed or rejected, with
    Server's reasons, including self_target and runtime_reserved_signal),
    not an exception. Signal names follow Server's rules and are refused in
    workflow code with InvalidExternalSignalException before anything is
    recorded. During cleanup after a cancellation request the command throws
    ExternalSignalRefusedException (cancellation_cleanup_command_not_available),
    as on Server. The existing child-handle signal() still sends directly.
    External PHP workers replay recorded outcomes but refuse new and pending
    requests, so only embedded workers deliver. A sender terminated while a
    delivery is admitting its signal records no outcome; the target may still
    receive that signal, as with an HTTP signal at that moment. No
    database migration. docs/api-stability.md#durable-signal-external explains
    why the API is experimental.

    Upgrade note: request IDs starting with workflow-signal: are now
    reserved. A signal or signal-with-start that uses one, through
    withRequestId(), the control plane's request_id or a signal webhook's
    X-Request-Id, is refused before anything is read or written: embedded
    calls throw InvalidCommandRequestIdException (reason()
    request_id_reserved); the control plane and signal webhooks return 422
    with reason: "request_id_reserved", outcome: "rejected_request_id_reserved" and accepted: false, the Server's body.
    Callers that already use that prefix must choose another before upgrading.
    Commands admitted earlier under such a key are unchanged.

  • The lost-lease schema check caches its result for 60 seconds by the framework
    clock instead of PHP's time(), so a frozen test clock holds the window and
    query-count tests no longer see an extra schema query on slow runs.