Releases: temporalio/sdk-go
v1.33.0
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)
v1.32.1
Versioning / Safe Deploy (pre-release)
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.
Worker Deployments provide a consistent interface to set versioning policy for multiple Task Queues within a versioned application. Versioning Behaviors eliminate the need of patching short-running Workflows by pinning them to a particular version. The new UpdateWorkflowExecutionOptions
API overrides versioning attributes for a particular workflow, or, using a batch command, for a set of workflows.
The following EXPERIMENTAL Versioning APIs implement Worker Deployments and Workflow Versioning Behavior annotations. It requires a server with version v1.26.2 or later.
Client.DeploymentClient()
:Describe()
: Show properties of a Worker Deployment.GetReachability()
: Return information to safely decommission Workers.List()
: Enumerate Worker Deployments in the client's namespaceSetCurrent()
: Set the current Deployment for a Deployment Series.GetCurrent()
: Find the current Deployment for a Deployment Series.
UpdateWorkflowExecutionOptions
: Override options of a workflow execution.Worker.Options.DeploymentOptions
: Set Deployment and Workflow Behavior defaults.Workflow.RegisterOptions.VersioningBehavior
: Annotate Workflow Behavior
Documentation is coming soon. Do not use above APIs in production.
Workflow Update
Workflow Update, excluding Update-with-Start, is no longer marked as experimental.
What’s Changed
2024-12-12 - ccb28ef - Versioning 3 (#1744)
2024-12-20 - 380add9 - Add Nexus links tests (#1613)
2025-01-08 - 423a9a3 - Remove Nexus OpCanceledBeforeStarted test (#1763)
2025-01-08 - 4dd46b8 - Resolve workflow name alias in Nexus WorkflowRunOperation (#1766)
2025-01-08 - 938dcad - Fix versioning override with AutoUpgrade behavior (#1765)
2025-01-10 - 815c648 - small docs/rendering fixes (#1769)
2025-01-10 - a708f7e - Remove docker flag that disables versioning tests (#1771)
2025-01-10 - b8f9b44 - docs: fix bullets in intellisense (#1768)
2025-01-14 - 3506cd2 - Fix doclink tool's duplicate docstring generation issue (#1773)
New Contributors
- @GSmithApps made their first contribution in #1768
Full Changelog: v1.31.0...v1.32.1
v1.31.0
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
v1.30.1
Breaking Changes
Nexus async Operations backed by ExecuteUntypedWorkflow
(i.e. NewWorkflowRunOperation
and NewWorkflowRunOperationWithOptions
) are now required to set the workflow ID on the StartWorkflowOptions
parameter. If workflow ID is unset, the new error ErrMissingWorkflowID
will be returned.
What's Changed
- Update mac intel runner to macos-13 by @Quinn-With-Two-Ns in #1702
- Fix lost signal from Selector when Default path blocks by @yuandrew in #1682
- Support user metadata on activities and child/scheduled workflows by @Quinn-With-Two-Ns in #1719
- Added SpanFromWorkflowContext function by @cdimitroulas in #1711
- Improve Update Workflow testing UX by @yuandrew in #1721
- Dedup duplicate update IDs for test environment by @yuandrew in #1695
- When evicting workflows from cache make sure all go routines are evicted serially by @Quinn-With-Two-Ns in #1718
- Add accessors for ChildWorkflowExecutionError fields by @yuandrew in #1726
- Fix worker leak in eager dispatcher by @Quinn-With-Two-Ns in #1723
- Set Nexus operation ID on callback headers by @pdoerner in #1710
New Contributors
- @cdimitroulas made their first contribution in #1711
Full Changelog: v1.30.0...v1.30.1
v1.30.0
Highlights
Nexus
We have made some improvements in Nexus metrics, nexus_task_execution_failed
is now tagged with a failure_reason
to help users understand the cause of the task failure.
see also: https://docs.temporal.io/references/sdk-metrics#nexus_task_execution_failed
Test Environment
Improved support for mocking Nexus operations so you won’t need to have access to the operation itself or implementing a dummy operation. You can mock by calling OnNexusOperation
and, when appropriate, RegisterNexusAsyncOperationCompletion
.
Docs coming soon.
Worker shutdown
When a Go SDK worker s shutting down it will now communicate to the Temporal service through a new ShutdownWorker
API that the worker is no longer taking more tasks. If the Temporal service supports this feature all sticky workflow tasks will be assigned back to the normal task queue. This should reduce latency caused by shutting down a worker due to stick task queue timeout.
What's Changed
2024-09-17 - 03e0341 - Use stable CLI for tests (#1637)
2024-09-17 - 8283604 - Remove DISABLE_NEXUS_TESTS env var from test code (#1640)
2024-09-23 - d10e871 - Update workflowcheck and allow it to handle aliased context (#1642)
2024-09-24 - cf3153e - expose ScheduleDescription (#1649)
2024-10-01 - 974ccc0 - Call the ShutdownWorker API as part of workflow worker cleanup (#1645)
2024-10-01 - f0ac2ee - Fix Nexus test env to respect ScheduleToCloseTimeout (#1636)
2024-10-02 - 772bc83 - MultiOperation retries non-durable Update (#1652)
2024-10-03 - 4e8380c - Error for unused Update operation (#1655)
2024-10-03 - cdd3070 - Remove history truncation (#1656)
2024-10-03 - d7a2128 - Enforce nexus request timeout in workflow test suite (#1653)
2024-10-03 - ea60ad5 - Evict the workflow from cache if their is a panic in the SDK (#1654)
2024-10-04 - 7d57a66 - ensure WorkflowTaskExecutionFailureCounter is called with a tag (#1658)
2024-10-08 - 75bd94b - Panic if endpoint or service is empty in NewNexusClient (#1661)
2024-10-08 - b300e50 - Nexus: Fix link not being attached to a workflow started via a Handler function (#1659)
2024-10-08 - b4e934e - Include updateID and updateName in update logger (#1660)
2024-10-08 - c82a8ac - Error if history contains unexpected events after the StartedEventId (#1662)
2024-10-09 - 3671c99 - fix link (#1665)
2024-10-14 - e503995 - Fix nexus_task_execution_failed to include OperationError outcome in start requests (#1664)
2024-10-15 - 7432064 - Add regression test to validate temporal_workflow_task_execution_failed on replay (#1669)
2024-10-16 - 959f581 - Read cgroups for resource tuner limits (#1632)
2024-10-16 - cfc38de - Fix TestNonDeterminismFailureCauseReplay integration test (#1674)
2024-10-18 - 1a13bf3 - Add Nexus failure_reason
metric tag (#1671)
2024-10-24 - 5505d04 - Fix failure_reason label for nexus_task_execution_failed metric on task timeout (#1684)
2024-10-24 - 56b601d - Bump Nexus sdk-go to v0.0.11 (#1685)
2024-10-25 - 2bd372c - Upgrade API to v1.40.0 (#1688)
2024-10-25 - c0a1b59 - Translate gRPC Canceled code to Nexus HandlerErrorTypeInternal (#1680)
2024-10-28 - 37d1775 - Support for mocking nexus operations (#1666)
2024-10-28 - 4afb587 - Update-with-Start incompatible options (#1690)
v1.29.1
v1.29.0
Highlights
Workflow Update-With-Start (Private Preview)
Note: This feature requires a server version 1.24+ and must be enabled. For self hosted you can set frontend.enableExecuteMultiOperation
for Temporal Cloud please reach out to your Temporal account team or Temporal Support Team to enable update with start in your namespace.
This release add support for Workflow Update-With-Start. Update-With-Start allows users to send a Workflow Update request along with a Start Workflow request in the same RPC. Users can think of Update-With-Start as analogous to Signal-With-Start except for Updates instead of Signals. To create a Update with start request users call client.NewUpdateWithStartWorkflowOperation
and pass it to WorkflowOptions.WithStartOperation
.
Slot auto tuning (Private Preview)
-
Added
WorkerOptions.Tuner
which is aWorkerTuner
composed ofSlotSupplier
s. These interfaces can be used to customize how the worker decides to make slots available for Workflow and Activity Tasks. Some default slot suppliers are included: -
ResourceBasedSlotSupplier
can be used to tune the workers slot count based on available memory and cpu resources. Make a ready-to-goWorkerTuner
by usingNewResourceBasedTuner
. You can set a memory/cpu target and the worker will automatically try to reach those target usage levels. -
FixedSizeSlotSupplier
always hands out slots until an upper bound -
CompositeTuner
can be used to combine different kinds ofSlotSuppliers
to implementWorkerTuner
.
Please give the resource based tuning a try and let us know how it works for you (feedback on community slack is welcome)! It'll work best if the worker is the only thing on your host using significant resources. Try setting the thresholds to a reasonable value like 0.8
Note: Resource based tuning and custom Slot Supplier implementations are currently considered experimental.
User Metadata (Public Preview)
Note: This feature requires a server version 1.25+
This release add support for user metadata inside Workflows. This lets users set custom metadata on Workflow executions and certain APIs inside workflow that will be visible on the UI
Currently the Go SDK support:
- Fixed "summary" and "details" on workflow start
- Details on timer names through
workflow.NewTimerWithOptions
- Details on signals, updates and query handlers through
workflow.SignalChannelOptions,
workflow.QueryHandlerOptions
andworkflow.UpdateHandlerOptions
See also: temporalio/features#486
What's Changed
2024-07-23 - 9c40461 - Add utility to get metrics handler for a Nexus operation (#1559)
2024-07-25 - bcc623d - Add support for managing schedule search attributes when when updating a schedule (#1562)
2024-07-26 - 1f0296c - Support for WorkflowIdConflictPolicy (#1563)
2024-07-29 - 2baa60e - Test duplicate rejected updates (#1569)
2024-07-29 - 6bb8f99 - Add rule code to warning (#1572)
2024-07-29 - dd28ced - Protect against legacy queries when state is destroyed (#1568)
2024-08-05 - 9b9201f - Use correct branch when not a pull request (#1578)
2024-08-05 - c5b519e - Build omes worker image w/ pending changes (#1577)
2024-08-06 - a1d05a6 - WorkerTuner & Resource based autotuning (#1546)
2024-08-06 - c2ce2e6 - Do not warn on unfinished handlers if workflow failed (#1581)
2024-08-08 - 2927574 - Switch omes to post-merge (#1583)
2024-08-09 - 0b7928d - Fix UpsertTypedSearchAttributes docs typo (#1585)
2024-08-14 - bb42a8b - Fix Go SDK CI (#1590)
2024-08-14 - c3ac511 - Improve docs and tests for HandlerUnfinishedPolicy (#1589)
2024-08-15 - 2a02c48 - Removing wording saying a signal will ignore start delay (#1592)
2024-08-15 - b5db2b7 - Add TaskQueueStats to DescribeTaskQueueEnhanced (#1553)
2024-08-20 - edc3c6c - Allow workflow interceptors to add nexus headers (#1604)
2024-08-21 - 1fe6141 - Support updates in tracing interceptor (#1595)
2024-08-21 - a31f86d - Address flaky tests (#1607)
2024-08-22 - 9bcc1a9 - Minor docstring grammar updates in activity.go (#1608)
2024-08-23 - 94f2100 - Minor correction to TQ stats docs (#1606)
2024-08-28 - 5364a47 - Handle Nexus links (#1605)
2024-08-29 - e85a098 - Update-with-Start operation (#1579)
2024-08-30 - 1b6220d - Mark Nexus link converter functions as experimental (#1615)
2024-08-30 - f47e644 - Experimental user metadata and workflow metadata query support (#1597)
2024-09-03 - 2af8c72 - Narrow scope of used slots lock for tracking slot supplier (#1617)
2024-09-03 - 52ea97f - Mark NewTimerWithOptions as Experimental (#1619)
2024-09-03 - eb41d13 - Expose QueryRejectedError (#1616)
2024-07-23 - 9c40461 - Add utility to get metrics handler for a Nexus operation (#1559)
2024-07-25 - bcc623d - Add support for managing schedule search attributes when when updating a schedule (#1562)
2024-07-26 - 1f0296c - Support for WorkflowIdConflictPolicy (#1563)
2024-07-29 - 2baa60e - Test duplicate rejected updates (#1569)
2024-07-29 - 6bb8f99 - Add rule code to warning (#1572)
2024-07-29 - dd28ced - Protect against legacy queries when state is destroyed (#1568)
2024-08-05 - 9b9201f - Use correct branch when not a pull request (#1578)
2024-08-05 - c5b519e - Build omes worker image w/ pending changes (#1577)
2024-08-06 - a1d05a6 - WorkerTuner & Resource based autotuning (#1546)
2024-08-06 - c2ce2e6 - Do not warn on unfinished handlers if workflow failed (#1581)
2024-08-08 - 2927574 - Switch omes to post-merge (#1583)
2024-08-09 - 0b7928d - Fix UpsertTypedSearchAttributes docs typo (#1585)
2024-08-14 - bb42a8b - Fix Go SDK CI (#1590)
2024-08-14 - c3ac511 - Improve docs and tests for HandlerUnfinishedPolicy (#1589)
2024-08-15 - 2a02c48 - Removing wording saying a signal will ignore start delay (#1592)
2024-08-15 - b5db2b7 - Add TaskQueueStats to DescribeTaskQueueEnhanced (#1553)
2024-08-20 - edc3c6c - Allow workflow interceptors to add nexus headers (#1604)
2024-08-21 - 1fe6141 - Support updates in tracing interceptor (#1595)
2024-08-21 - a31f86d - Address flaky tests (#1607)
2024-08-22 - 9bcc1a9 - Minor docstring grammar updates in activity.go (#1608)
2024-08-23 - 94f2100 - Minor correction to TQ stats docs (#1606)
2024-08-28 - 5364a47 - Handle Nexus links (#1605)
2024-08-29 - e85a098 - Update-with-Start operation (#1579)
2024-08-30 - 1b6220d - Mark Nexus link converter functions as experimental (#1615)
2024-08-30 - f47e644 - Experimental user metadata and workflow metadata query support (#1597)
2024-09-03 - 2af8c72 - Narrow scope of used slots lock for tracking slot supplier (#1617)
2024-09-03 - 52ea97f - Mark NewTimerWithOptions as Experimental (#1619)
2024-09-03 - eb41d13 - Expose QueryRejectedError (#1616)
2024-09-05 - 6f8719a - Improve active task queue definition (#1621)
v1.28.1
v1.28.0
Nexus pre-release
See the proposal for usage instructions.
Self hosted users can try Nexus out in single cluster deployments with server version 1.25.0-rc.0
- not meant for production use.
Temporal Cloud users may reach out and open a support ticket to request access to the pre-release.
To use Nexus with the temporal
CLI dev server:
-
download CLI
0.14.0-nexus.0
to the current directory:curl -sSf https://temporal.download/cli.sh | sh -s -- --version v0.14.0-nexus.0 --dir .
-
run the dev server with the required configs:
./temporal server start-dev --dynamic-config-value system.enableNexus=true --http-port 7243
Warn on unfinished handlers
The SDK will now WARN
by default if a workflow is completed by the SDK with unfinished update handlers. Users can use workflow.AllHandlersFinished
to wait for all handlers to be finished or set UnfinishedPolicy
in UpdateHandlerOptions
.
Add Workflow safe Mutex and Semaphore
This release includes new helper interfaces workflow.Mutex
and workflow.Semaphore
that are workflow safe versions of a mutex and semaphore. These interfaces are to help users synchronize sensitive business logic across multiple coroutines or update handlers.
What's Changed
- Clean up docs for NextRetryDelay by @Quinn-With-Two-Ns in #1522
- Update some docs around grpc Dial options by @Quinn-With-Two-Ns in #1514
- Wrap GRPC::CANCELED and DEADLINE_EXCEEDED in an SDK Timeout exception… by @Quinn-With-Two-Ns in #1524
- Use grpc context for GetSystemInfo. by @Quinn-With-Two-Ns in #1528
- Add option to handle scream snake case enums. by @Quinn-With-Two-Ns in #1529
- Add workflow safe Mutex and Semaphore by @Quinn-With-Two-Ns in #1530
- Ensure our proxy helpers forward metadata by @Quinn-With-Two-Ns in #1531
- Point feature repo back to main by @Quinn-With-Two-Ns in #1532
- Warn on unhandled updates by @Quinn-With-Two-Ns in #1533
- Experimental cloud operations client by @cretz in #1462
- add Name method to ReceiveChannel and SendChannel interface by @bentveljanzx in #1538
- Test AllHandlersFinished in update validator by @Quinn-With-Two-Ns in #1540
- Fix some Deprecated go docs by @Quinn-With-Two-Ns in #1542
- Fix bug in updateWorkflowByID by @Quinn-With-Two-Ns in #1548
- Fix typed search attributes with SignalWithStartWorkflow by @Quinn-With-Two-Ns in #1552
- Add support for query parameter when listing schedules by @justinp-tt in #1556
- Nexus by @bergundy in #1555
v1.27.0
Reset workflow with Updates
The Go SDK now supports reapplying Workflow Updates when resetting a workflow execution.
Note: Support for reapplying updates on workflow reset require a server version ≥1.24.0
Request failure code labeled metrics
gRPC request failure metrics (*request_failure
) emitted by the Go SDK now include the error status code as a tag under status_code
. This can be disabled by setting DisableErrorCodeMetricTags
on client.Options
.
See also: #1472
💥 BREAKING CHANGES
This release includes some breaking changes for the experimental features Workflow Update and Worker Versioning. Users of these features should read the release notes carefully before upgrading.
Workflow Update (Experimental)
Based on users feedback this release makes some breaking changes to the Workflow Update API used by client and workflows code.
Client API changes
- Merged
Client.UpdateWorkflowWithOptions
andClient.UpdateWorkflow
into one API calledClient.UpdateWorkflow
that takes aclient.UpdateWorkflowOptions
struct. WaitPolicy
inclient.UpdateWorkflowOptions
was replaced withWaitForStage
.WaitForStage
is now a required parameter inclient.UpdateWorkflowOptions
.WaitForStage
is now properly respected byClient.UpdateWorkflow
. PreviouslyClient.UpdateWorkflow
may have returned a handle before the desiredWaitForStage
was reached.
Workflow API changes
workflow.SetUpdateHandler
andworkflow.SetUpdateHandlerWithOptions
Now require update handles to take aworkflow.Context
as the first argument.workflow.GetUpdateInfo
has been renamed toworkflow.GetCurrentUpdateInfo
.
Worker Versioning (Experimental)
Worker Versioning is a pre-release, experimental feature that simplifies managing code changes by allowing you to peg workflows to build versions. This change revamps and improves the API and deprecates the existing experience.
The new APIs introduced with worker versioning are:
GetWorkerVersioningRules
returns assignment and redirect rules for a given task queue.UpdateWorkerVersioningRules
updates assignment and redirect rules for a given task queue.DescribeTaskQueueEnhanced
extends the functionality ofDescribeTaskQueue
with workflow reachability status.
A few APIs associated with legacy worker versioning have been deprecated:
UpdateWorkerBuildIdCompatibility
replaced byUpdateWorkerVersioningRules
.GetWorkerBuildIdCompatibility
replaced byGetWorkerVersioningRules
.GetWorkerTaskReachability
replaced byDescribeTaskQueueEnhanced
.
Note: These new Worker Versioning APIs require a server version ≥1.24.0
Internally call grpc.NewClient
instead of grpc.Dial
Internally the SDK now calls grpc.NewClient
instead of grpc.Dial
because it was deprecated in google.golang.org/grpc
This should be a transparent change to most users, google.golang.org/grpc
does call out one subtle difference:
One subtle difference between NewClient and Dial and DialContext is that the former uses "dns" as the default name resolver, while the latter use "passthrough" for backward compatibility. This distinction should not matter to most users, but could matter to legacy users that specify a custom dialer and expect it to receive the target string directly.
Some deprecated dial options like WithBlock
, WithTimeout
, WithReturnConnectionError
, and FailOnNonTempDialError
are now ignored by grpc.NewClient
. See https://github.com/grpc/grpc-go/blob/master/Documentation/anti-patterns.md for more context.
See also: #1488
Child workflows now properly Continue-As-New in the TestWorkflowEnvironment
In previous version of the Go SDK when a child workflow running in the test environment tried to continue as new the parent workflow would receive an error from the child workflow. Now the child workflow properly continues as new and the parent workflow will not receive an error.
See also: #1437
Specific Changes
2024-04-12 - c4bf074 - datadog: Add tracer option to check error eligibility in the span (#1438)
2024-04-17 - 69bc6c3 - Update reapply (#1436)
2024-04-23 - 93c08b0 - Ensure consistent labels for rpc metrics (#1444)
2024-04-24 - 8361067 - Disable UTF8-invalid tests when running CLI dev server (#1448)
2024-04-30 - fe44a47 - Improve error message for missing body (#1451)
2024-05-01 - d051de6 - Option to redirect devserver stdout/stderr to a file (#1452)
2024-05-09 - 386a6d3 - Require update handler to have a context (#1457)
2024-05-09 - ded70a3 - Add support for NextRetryDelay for local activities (#1456)
2024-05-10 - 81cd5dc - Fix QueryRejectCondition parameter in QueryWorkflowWithOptions (#1461)
2024-05-10 - c69831e - Remove DisableStickyExecution (#1464)
2024-05-14 - 3b68c6d - Add request failure code label to metrics (#1472)
2024-05-17 - aa17647 - get-free-port: prevent duplicate ports on Linux (#1478)
2024-05-21 - 06c0ebc - Add SetFailureConverter
to the activity and workflow test environments (#1484)
2024-05-21 - 222d4cf - Fix gauge metrics with latest otel SDK (#1482)
2024-05-21 - 725b428 - Only record activity_succeed_endtoend_latency on success (#1481)
2024-05-21 - fb06909 - Send original update request back in response (#1480)
2024-05-22 - bf2c79d - Switch to using Float64Gauge in otel integration (#1485)
2024-05-24 - a6ca6a5 - Replace grpc.Dial with grpc.NewClient (#1488)
2024-05-28 - bcfa85a - Workflow update client API refactor (#1489)
2024-05-31 - 486c233 - Minor logger improovments (#1495)
2024-05-31 - 4dd1ed8 - Fix bugs when using a custom FailureConverter
in tests (#1490)
2024-06-06 - 0df7ad5 - Bump GitHub Actions (#1503)
2024-06-06 - 17193aa - Manually copy proxy options (#1502)
2024-06-06 - 5c171b7 - Make backfill tests more robust (#1504)
2024-06-06 - 9ecb2a4 - Change GetUpdateInfo to GetCurrentUpdateInfo (#1505)
2024-06-06 - bf29944 - testsuite.StartDevServer: Respect timeout during dial (#1498)
2024-06-07 - c73a007 - Support the new versioning API (#1494)
2024-06-10 - d4ff1f6 - Fix flake in TestUpdateAdmittedNoWorker (#1506)
2024-06-12 - 38fe879 - Always run all the versioning tests (#1510)
2024-06-12 - a7c8208 - Allow SDK to handle speculative WFT with command events (#1509)
2024-06-13 - 2720358 - Improve CI action (#1512)
2024-06-13 - 30a29ce - Add integration test for reset with update events (#1507)
2024-06-13 - 4c8b9e1 - Update API to v1.34.0 (#1511)