Highlights
Added
- Added
client.Options.RPCTimeoutto configure the default RPC timeout cap, including raising it above 10 seconds. Shorter caller deadlines still take precedence, and calls with dedicated timeouts (such as long polls) are unchanged. converter.WorkflowTaskFailureError: an opt-in error aPayloadCodeccan return fromEncodeorDecodeon a workflow-side payload path to fail the current Workflow Task rather than the Workflow Execution, so the server retries the task and a transient codec failure can recover while the execution stays open. See theWorkflowTaskFailureErrordocs for the honored paths, exclusions, and retry guidance.- Added experimental
SignalWithStartWorkflowAPI to theworkflowpackage. - Added opt-in
EncodeHeaderstracing options andworkflow.CodecContextPropagatorfor header codec processing using the configured client's codec. Only opted-in producers' output is encoded; user-supplied wire-ready headers are unchanged. Receiving consumers use private decoded views. Custom converter wrappers can expose codec stages throughconverter.PayloadCodecProvider. - Added experimental Event Groups support:
workflow.NewEventGroup,workflow.WithEventGroups, andEventGroupson workflow command options. Update handlers get an implicit group. Signal handlers do not. - Added client interceptor hooks for
Client.GetWorkflow(GetWorkflowRun),WorkflowRun.Get/GetWithOptions(GetWorkflowResult), andClient.GetWorkflowHistory. Handle interception runs before lazy target resolution, allowing workflow IDs to be rewritten before any lookup. Result interception also runs before lazy target resolution, wraps the complete wait including followed runs, and returns the encoded result or workflow error before result decoding; history interception can wrap the lazily fetched iterator. - Plugins can report a version in worker heartbeats, with
SimplePluginOptions.Versionor aVersion() stringmethod on the plugin. client.WorkflowExecutionDescriptionnow includesRawResponse, the fullworkflowservice.DescribeWorkflowExecutionResponsereturned by the server.- Added experimental
temporalnexus.ConvertLinkCallbackToNexusLinkandtemporalnexus.ConvertNexusLinkToLinkCallbackfor convertingLink_Callbackto and from Nexus links. - Nexus handlers now propagate
NexusSerializationContextto the workflows, workflow updates, and standalone activities they start, which use it for payloads returned to the Nexus caller: results, failures, and standalone activity heartbeat details. When completing or heartbeating such an activity from a client, passactivity.Info.NexusSerializationContextin the options. - Poller pools now report their poller target to the server on each poll and in the worker heartbeat: the current target for autoscaling pools, the configured maximum for fixed-size pools. Server will use this count for load balancing pollers between workers, and for creating a per-worker poller count metric
Changed
- Existing gRPC retries now honor positive
google.rpc.RetryInfodelays onResourceExhaustedresponses as a minimum wait. Retries are skipped when the delay cannot fit before the call deadline. WorkflowTaskPollerBehavior,ActivityTaskPollerBehavior, andNexusTaskPollerBehaviorworker options are no longer marked experimental.- Experimental:
SignalWorkflowandSignalWithStartWorkflowcalled throughNexusClient.GetWorkflowClient()in a Temporal operation handler now reuse the operation's request ID, so a retried Nexus task no longer delivers the same signal twice. Signals sent throughtemporalnexus.GetClientkeep an independent request ID per call and are not deduplicated.
Deprecated
client.Client.DescribeWorkflowExecutionis deprecated. UseDescribeWorkflowand access its response'sRawResponsefield for the full server response instead.
💥 Breaking Changes
- When reconstructing state for a query delivered without any new history, the SDK no longer applies input events, such as signals, that have not been processed by a completed workflow task. Replay stops at the last completed workflow task advertised with the query, even if fetched history has advanced further. This can change query results for closed workflows with pending signals. Reconstruction fails if the advertised completed task is missing from history.
workflow.NewContinueAsNewErrorWithOptionsnow callsinterceptor.WorkflowOutboundInterceptor.NewContinueAsNewErrorWithOptionsdirectly. It previously went throughNewContinueAsNewError, then appliedContinueAsNewErrorOptionsto the error that hook returned. An interceptor that overrides onlyNewContinueAsNewErrorno longer runs forNewContinueAsNewErrorWithOptionscalls. Override the new method as well; the SDK tracing interceptors already do. An interceptor that records workflow commands insideNewContinueAsNewErrorcan cause a non-determinism error on replay when the workflow already calledNewContinueAsNewErrorWithOptions.- Experimental: A Temporal operation handler (
temporalnexus.NewTemporalOperation) can now send only one signal per operation invocation throughNexusClient.GetWorkflowClient().SignalWorkflowandSignalWithStartWorkflowcount toward the same limit. While the first signal is in flight, or after it succeeds, a second signal to any workflow returns aBAD_REQUESThandler error. If the first signal returns an error, the limit resets and the handler can signal again. Signals sent throughtemporalnexus.GetClientare not limited. - Experimental:
SignalWithStartWorkflowcalled throughNexusClient.GetWorkflowClient()in a Temporal operation handler now requires an explicit workflow ID and returns aBAD_REQUESThandler error when it is empty. An empty ID is defaulted to a fresh UUID per call, so the server has no record to deduplicate against and each retried Nexus task would start another workflow.
Fixed
- Fixed premature activity cancellation on internal heartbeat errors when using a client created with
client.NewClientFromExistingand the server supports internal error differentiation. - Fixed missing
temporal_activity_schedule_to_start_latencysamples for eagerly dispatched activities. Like polled activities, eager activities now record this metric on receipt, including during worker shutdown. - Fixed a data race between dynamic workflow factory re-registration and workflow definition lookup in workers and
TestWorkflowEnvironment. - Fixed queries delivered without any new history failing with an invalid state transition when a workflow cache miss fetches history newer than the query task's replay boundary.
- Fixed premature activity cancellation when a heartbeat RPC returns
DeadlineExceeded. The SDK now preserves Temporal service error codes when deciding whether a heartbeat failure should cancel the activity. - Fixed concurrent dev-server CLI downloads failing on Windows when another process has already populated and started the cached executable.
- Fixed a deadlock between data converter deadlock-detector pausing and workflow coroutine cleanup.
workflow.DataConverterWithoutDeadlockDetectionnow also exempts automatic header codec calls and their serialization-context binding from workflow deadlock detection.converter.NewRemotePayloadCodecnow handles endpoint URLs with trailing slashes.- Fixed race when using
log.Withwithout aWithLoggerimplementation, where logs could overwrite each others' buffers. - The default timeout for client and worker RPCs has been extended. Previously, the default timeout was only half the caller's context deadline - now it uses the entire deadline, up to a maximum of ten seconds. RPCs with timeout overrides, like long-poll RPCs, are unchanged.
- Query tracing now always records inbound spans when serving queries, regardless of
IsReplayingstate.
What's Changed
- Recommend module-scoped workflowcheck usage by @jstar0 in #2756
- Add link conversion for Nexus handler callbacks by @atol in #2796
- 💥 fix(extstore): require Go SDK v1.50.0 in the S3 and GCS drivers by @jmaeagle99 in #2797
- Extend gRPC default timeout to use more of ctx.Deadline by @thestephenstanton in #2784
- Fix log.With field slice aliasing by @fallintoplace in #2801
- Clarify contributor restrictions on soliciting user information by @eamsden in #2794
- Bump actions/upload-artifact from 7.0.1 to 7.0.2 by @dependabot [bot] in #2806
- Fix trailing slashes in remote payload codec endpoints by @fallintoplace in #2793
- Fix query tracing for replay by @yuandrew in #2779
- Add generated payload limit validator by @jmaeagle99 in #2762
- Remove experimental notes from poller behavior options by @veeral-patel in #2810
- Make contextual transfer conversion SDK-internal by @dplyukhin in #2763
- Add system nexus operation registry by @dplyukhin in #2721
- Add Required PR Checks job to gate merges by @cconstable in #2809
- Nexus serialization context for async operations by @JoshuaFrenchwood in #2738
- De-duplicate Nexus Signal and SignalWithStart operations by @atol in #2781
- Updating NexusSerializationContext to only be used for SAA result/failures by @JoshuaFrenchwood in #2828
- Nexus Serialization Context for UpdateWorkflow by @JoshuaFrenchwood in #2780
- VLN-1876: remediate go-jose-below-4.1.6 by @milescrabill in #2829
- Preserve service error codes when classifying RPC retries by @lilydoar in #2824
- Fix dynamic workflow registry data race by @dplyukhin in #2765
- Nexus serialization context async completion by @JoshuaFrenchwood in #2831
- Fix schedule-to-start latency metrics for eager activities by @natemollica-nm in #2832
- feat(envconfig): Add extension support by @johanngan in #2771
- Move macOS arm64 CI runners to macos-15 by @jmaeagle99 in #2839
- test: cover sending of paginated workflow task completions by @jmaeagle99 in #2837
- VLN-1876: go mod tidy to drop stale go-jose sums by @milescrabill in #2838
- Test: Remove stale payload limit by @yuandrew in #2814
- [SDK Sentinel] Stabilize local activity retry attempt assertion by @sdk-sentinel-bot in #2788
- [SDK Sentinel] Stabilize activity retry poll metric assertion by @sdk-sentinel-bot in #2813
- [SDK Sentinel] Stabilize disabled payload-limit workflow result test by @sdk-sentinel-bot in #2698
- Share excludeInternalFromRetry with clients created from existing by @marakulin-a in #2790
- Fix Nexus callback allowlist in Docker tests by @yuandrew in #2846
- [SDK Sentinel] Stabilize local activity shutdown test by @sdk-sentinel-bot in #2766
- Run required PR checks only on pull requests by @yuandrew in #2847
- Test poller autoscaling signal handling by @yuandrew in #2835
- Expose raw workflow descriptions and deprecate DescribeWorkflowExecution by @Quinn-With-Two-Ns in #2849
- Report plugin versions in worker heartbeats by @campoy in #2843
- Add workflow run, result, and history client interceptors by @Quinn-With-Two-Ns in #2841
- Remove Intel macOS from CI by @Quinn-With-Two-Ns in #2854
- Add experimental Event Groups support by @mjameswh in #2827
- Add opt-in header codec processing by @Sushisource in #2818
- Bound standalone query replay to completed workflow tasks by @Quinn-With-Two-Ns in #2852
- feat(envconfig): Support extra config fields at any level of nesting within a profile by @jeri-temporal in #2785
- [SDK Sentinel] Stabilize schedule backfill integration tests by @sdk-sentinel-bot in #2860
- Prepare contrib/envconfig release 1.1.0 by @yuandrew in #2861
- Update go.temporal.io/api to v1.64.3 by @veeral-patel in #2862
- Add PayloadCodec WorkflowTaskFailureError marker by @whitemanthedj in #2529
- feat: Add contrib/aws/secretsmanager envconfig extension by @johanngan in #2772
- fix(secretsmanager): go mod tidy by @johanngan in #2863
- Report poller target on each poll and in the worker heartbeat by @veeral-patel in #2799
- Require Cloud CI before merging by @yuandrew in #2865
- Separate contrib/ integration test out to separate test/ dir by @yuandrew in #2864
- incorporate server RetryInfo delay on ResourceExhausted gRPC retries by @timl3136 in #2834
- Prepare contrib/aws/secretsmanager release 0.1.0 by @johanngan in #2867
- Allow configuring the default RPC timeout by @Quinn-With-Two-Ns in #2866
- Add workflow.SignalWithStartWorkflow and System Nexus generator script by @dplyukhin in #2812
- Support context propagation and telemetry in workflow.SignalWithStart by @dplyukhin in #2855
New Contributors
- @atol made their first contribution in #2796
- @thestephenstanton made their first contribution in #2784
- @milescrabill made their first contribution in #2829
- @lilydoar made their first contribution in #2824
- @natemollica-nm made their first contribution in #2832
- @johanngan made their first contribution in #2771
- @marakulin-a made their first contribution in #2790
- @campoy made their first contribution in #2843
- @jeri-temporal made their first contribution in #2785
- @whitemanthedj made their first contribution in #2529
- @timl3136 made their first contribution in #2834
Full Changelog: v1.50.0...v1.51.0