Nexus Breaking Changes
Add support for full Temporal error rehydration to provide a more consistent experience for Temporal users and on par debugging experience with workflows and activities..
Any Temporal errors returned over the Nexus boundary will now automatically be fully rehydrated on the caller side.
Some notable points:
- The Nexus SDK was upgraded to
v0.1.0
, which is a breaking change. Temporal Nexus users should refer to the release notes before upgrading the Temporal SDK. nexus.HandlerError
now has aFailure
representation and is visible to the caller workflow.- Arbitrary errors are translated to
ApplicationError
as they do in the rest of the Temporal SDK. WorkflowExecutionError
,QueryRejectedError
, and non retryableApplicationError
s are no longer translated to bad request handler errors, instead they're translated toOperationError
s.
Update With Start
UpdateWithStartWorkflow
issues an update-with-start request. A WorkflowIDConflictPolicy
must be set in the options. If the specified workflow execution is not running, then a new workflow execution is started and the update is sent in the first workflow task. Alternatively if the specified workflow execution is running then, if the WorkflowIDConflictPolicy
is USE_EXISTING
, the update is issued against the specified workflow, and if the WorkflowIDConflictPolicy
is FAIL
, an error is returned. The call will block until the update has reached the WaitForStage
in the options. Note that this means that the call will notreturn successfully until the update has been delivered to a worker.
Changes in this release:
Instead of using the ExecuteWorkflow
client method, update-with-start is invoked via a new client method UpdateWithStartWorkflow
.
To use this method, you should first use NewWithStartWorkflowOperation
to define the start-workflow operation. A workflow ID conflict policy is required. Then call UpdateWithStartWorkflow
, passing it an UpdateWithStartWorkflowOptions
containing your WithStartWorkflowOperation
, together with an UpdateWorkflowOptions
defining the update operation. This will return an UpdateHandle
. The WithStartWorkflowOperation
exposes a blocking .Get(ctx)
method to obtain the workflow run targeted by the update.
New Contributors
What's Changed
2024-12-02 - 2c6bc1d - Introduce separate slot supplier for session activities (#1736)
2024-12-03 - 9c4dde8 - Use constant case in Nexus link URL eventType query param (#1741)
2024-12-03 - aa4535d - WorkflowTestSuite.UpdateWorkflow generate an update ID if none (#1738)
2024-12-05 - 01b52a2 - Tweak UpdateWorfklow docs (#1745)
2024-12-05 - 9d59447 - New Update-With-Start API (#1731)
2024-12-06 - 1f35a5b - mock: in order mock calls using new testify mock.InOrder() method (#1743)
2024-12-06 - 7828e06 - Update Godoc for internal structs/funcs to clarify the package they are exposed under (#1735)
2024-12-09 - 41e9b33 - Tweak Update-with-Start error reporting (#1746)
2024-12-10 - 1b21084 - Bump SDKVersion to 1.31.0 (#1753)
2024-12-10 - d21ede2 - Nexus error rehydration (#1751)
Full Changelog: v1.30.1...v1.31.0