Breaking Changes
Nexus
⚠️ IMPORTANT⚠️ This SDK release requires server>=1.27.0
to properly support the full set of changes from the previous SDK release. Most notably the built-in error translation logic changed in a way that may cause Nexus tasks to retry until the caller specified schedule-to-close timeout on certain failures, see more below.- Setting
WorkflowIDConflictPolicy
toWORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING
has been temporarily disabled, and will fail requests with a retryable internal error.- This is to protect users from making a false assumption that the same workflow can be used to back multiple operations. This capability will be enabled in a follow up release.
- Error translation logic changed in the following ways:
serviceerrors
returned by the client withcodes.AlreadyExists, codes.FailedPrecondition, codes.OutOfRange
now get translated to non retryable internal Nexus handler errors.
- Non retryable
ApplicationErrors
get translated to non retryable internal Nexus handler errors instead of bad request errors. QueryRejectedError
andWorkflowExecutionError
no longer get translated to a bad request automatically.- Removed operation and service labels from Nexus schedule to start metric.
Versioning / Safe Deploy
This release introduces a preview of new APIs that gracefully manage code changes and worker pools that support them. The goal is to better control which workers should execute new, and existing, workflows and activities tasks, based on their code and configuration.
A Worker Deployment is a collection of Worker Deployment Versions, typically associated with a single application. Each Version abstracts away the multiple Task Queues associated with this application, providing a common interface to set versioning policy to the workers polling those queues for tasks. A Worker Deployment has a Current Version, where tasks for new workflows and activities, and also tasks for AutoUpgrade
existing workflows, are dispatched. A Worker Deployment can also have a Ramping Version to gradually move tasks from the Current Version to another one.
AutoUpgrade
and Pinned
are two Versioning Behaviors that can be specified when registering a workflow type. Pinned
workflows are typically short lived, and are never affected by new versions, i.e., they do not need to use the patch API for compatibility. AutoUpgrade
workflows are mostly long running, but they need to use patching to safely transition to new versions. The choice of Pinned
vs AutoUpgrade
ultimately depends on your willingness to keep old worker fleets running vs the complexity of patching.
In cases when you need to override the existing Versioning Behavior for a workflow, or a set of workflows, you can use the new UpdateWorkflowExecutionOptions
API, which also operates on batches.
The following EXPERIMENTAL Versioning APIs implement Worker Deployments and Workflow Versioning Behavior annotations. It requires a server with version v1.27.0 or later.
Client.WorkerDeploymentClient()
:Delete()
: Remove a Worker Deployment.GetHandle()
: Return a handle to a Worker Deployment.List()
: Enumerate Worker Deployments in the client's namespace
Client.WorkerDeploymentHandle()
:SetCurrentVersion()
: Set the Current Version for a Worker Deployment.SetRampingVersion()
: Set the Ramping Version for a Worker Deployment.Describe()
: Return a description of this Worker Deployment.DescribeVersion()
: Return a description of a Version in this Worker Deployment.DeleteVersion()
: Remove a Version in this Worker Deployment.UpdateVersionMetadata()
: Change user-provided metadata associated with a Version.
UpdateWorkflowExecutionOptions
: Override options of a workflow execution.Worker.Options.DeploymentOptions
: Set Deployment Version and Workflow Behavior defaults.Workflow.RegisterOptions.VersioningBehavior
: Annotate Workflow Behavior.
Documentation is coming soon. Do not use above APIs in production.
Cloud Operator API
Removed the Cloud Operations Client from this SDK. Users should use https://github.com/temporalio/cloud-sdk-go instead.
Highlights
Nexus
🎉 Nexus is now generally available 🎉
- Added experimental support for Nexus operation interceptors.
- Added experimental tracing interceptor support for tracing calls from a workflow to a Nexus handler through client operations, such as starting a workflow.
- The test environment behavior is now more consistent with the server behavior, especially with changes made since the 1.25 release.
- Main Nexus APIs are no longer marked as experimental.
- The Nexus APIs and fields were marked as deprecated and will be removed in the next minor release:
OperationID
was renamed toOperationToken
and the content of it was changed to a structured token instead of copying the workflow ID directly.temporalnexus.NewSyncOperation
is now deprecated, usenexus.NewSyncOperation
in combination withtemporalnexus.GetClient
to get similar functionality.
- Nexus now supports full error rehydration from the handler back to the caller workflow including support for the SDK’s
FailureConverter
. - Upgraded Nexus SDK from
0.1.0
to0.3.0
, see changes here:
Workflow Reset
This release fixes a long standing issue in the Go SDK where workflows reset with a completed child workflow with the default WorkflowID would fail to replay due to a non-determinism error.
Note: This change will cause workflows that were previously stuck by #723 to become unstuck.
What’s Changed
2025-01-16 - 1c6e01b - Disable TestPinnedBehaviorThreeWorkers() test (#1780)
2025-01-17 - 2bf36d6 - Expose user metadata fields on scheduling workflows (#1782)
2025-01-17 - 454a8a8 - Add Nexus SignalWorkflowOperation (#1770)
2025-01-21 - 3befe6b - Upgrade api to 1.43.2 and Nexus to 0.1.1 (#1784)
2025-01-22 - b43588c - Fix update docstring to include context (#1785)
2025-01-23 - d2f4c14 - Update bug issue template to use bug
label (#1787)
2025-01-24 - 34bbbbf - Clarify warning log on activity deadlone (#1786)
2025-01-25 - 751fa9a - Remove protolegacy build tag and InvalidUTF8Suite (#1789)
2025-01-28 - 7728bd7 - Unpin CLI (#1794)
2025-01-28 - c0ac008 - Expose workflow client from Activity (#1783)
2025-01-31 - 0262297 - Enable speculative workflow task with commands (#1724)
2025-02-03 - 349283d - Fix Update-with-Start grpc deadline (#1798)
2025-02-03 - 8f05d01 - Don't replay commands from non-completed task (#1750)
2025-02-03 - bfd12ac - Fail Nexus Operation for incompatible input type (#1800)
2025-02-04 - 2030f9b - Revert WorkflowSignalOperation (#1801)
2025-02-04 - 24542f7 - Set Temporal-Namespace header on every namespace-specific gRPC request (#1467)
2025-02-06 - 6e75f6d - Expand arguments in UpdateWorkflow call when args equal one (#1799)
2025-02-07 - 150b4bd - Reserve _temporal prefix (#1806)
2025-02-07 - b8bc1c5 - Fix missing variadic ellipsis, added test to validate (#1804)
2025-02-08 - b9ad14a - Add option to override UI port (#1793)
2025-02-10 - 1540ba4 - Fix doc links on pkg.go.dev (#1795)
2025-02-10 - 22ebdc0 - Upgrade to Nexus SDK 0.2.0 (#1802)
2025-02-10 - e5ce2c4 - Replace golang.org/x/exp
with stdlib (#1807)
2025-02-11 - 9d4a99a - Add note that SetOnActivityHeartbeatListener may be called concurrently (#1818)
2025-02-11 - f29a8c5 - Rename operationID to token in TestWorkflowEnvironment (#1813)
2025-02-12 - 8101b82 - Remove Experimental annotation on Nexus APIs (#1816)
2025-02-13 - 82c56a9 - Only fallback to workflow ID as operation token when needed (#1821)
2025-02-13 - e5bc298 - Stop checking for definitions inside of functions (#1819)
2025-02-14 - 4fb50dc - Properly convert Nexus HandlerErrors in the test env (#1822)
2025-02-14 - b19fc66 - Catchup tasks for Nexus features in the test env (#1824)
2025-02-14 - f223359 - temporarily disable TestNumPollersCounter while I look into why it's flaking (#1826)
2025-02-18 - 617de7e - Add tests for nexus error rehydration (#1767)
2025-02-18 - 623badd - Remove cloud ops client (#1831)
2025-02-18 - 8f38795 - Remove operation and service labels from Nexus schedule to start metric (#1830)
2025-02-19 - 7e3d821 - Fix child WF ID generation (#1803)
2025-02-19 - e44e74e - Move SetStickyWorkflowCacheSize to global config setup (#1836)
2025-02-20 - c99ec47 - Translate relevant errors to non retryable internal Nexus handler errors (#1833)
2025-02-21 - 1720257 - More user-friendly NDE error message (#1837)
2025-02-21 - f5882aa - Support Worker Deployments 3.1 (#1832)
2025-02-22 - d32c252 - Nexus interceptors (#1841)
2025-02-24 - 2449502 - Support conflict options for starting Nexus operations in test framework (#1828)
2025-02-24 - 61c10ce - Fix AsTime() for nil proto timestamp (#1847)
2025-02-24 - b2b75c9 - [Nexus] Set OnConflictOptions for WorkflowRunOperation (#1797)
2025-02-25 - 24db567 - Release Go SDK v1.33.0
2025-02-25 - ab1c356 - Block using conflict policy UseExisting for Nexus WorkflowRunOperation (#1845)
2025-02-25 - f3da1f5 - Add Nexus tracing interceptor (#1844)