Go SDK
$
npx @buildinternet/releases get temporal-go-sdkMon
Wed
Fri
OctNovDecJanFebMarAprMayJunJulAugSepOct
LessMore
Releases12Avg4/moVersionsv1.50.0
npx @buildinternet/releases get temporal-go-sdktemporalnexus.ConvertLinkCallbackToNexusLink and temporalnexus.ConvertNexusLinkToLinkCallback
for converting Link_Callback to and from Nexus links.converter.NewRemotePayloadCodec now handles endpoint URLs with trailing slashes.log.With without a WithLogger implementation, where logs could overwrite each others' buffers.IsReplaying state.workflow.ChildWorkflowOptions.VersioningOverride for explicitly pinning,
auto-upgrading, or one-time routing a child workflow independently of its parent.
This requires Temporal Server 1.32.0 or later.converter.NewTransferTypeConverter API that implements transfer type conversion.
converter.GetDefaultDataConverter() now supports transfer type conversion.SimpleMaximum is unchanged, and autoscaling
behaves as before when no poller groups are configured.TestWorkflowEnvironment and TestActivityEnvironment now run worker plugins set through
SetWorkerOptions(worker.Options{Plugins: ...}), which were previously ignored. Once plugins are
set, SetWorkerOptions may not be called again on that environment, and what a plugin registers
in StartWorker is undone at StopWorker.TestActivityEnvironment now has RegisterDynamicActivity and implements worker.ActivityRegistry
again.temporalnexus.ConvertNexusLinkToLinkWorkflow, the decoding counterpart of
ConvertWorkflowLinkToNexusLink.workflow.NewLocalVar[T](ctx) for type-safe values bound to a workflow run that can be
accessed from workflow code and workflow interceptors. Copies of a workflow.LocalVar[T] share
identity.ExternalStorage.Concurrency sets
MaxDriverOperations (for one client or worker) and MaxOperationsPerMessage (for one
message). Drivers must use ctx.GetLimiter() for store and retrieve operations.temporalnexus.ConvertCommonLinkToNexusLink
converts NexusOperation and Activity links rather than returning an empty nexus.Link.[TMPRL1104] workflow task duration log now uses a single warning threshold, configurable
with the TEMPORAL_WORKFLOW_TASK_DURATION_WARN_SECONDS environment variable and defaulting to 5
seconds. It previously warned above a fixed 10 seconds, logged at info above a fixed 5 seconds,
and logged at debug below that when trace logging was enabled.contrib/googleadk to
temporalio/ai-integrations.
Its module path is now go.temporal.io/googleadk instead of
go.temporal.io/sdk/contrib/googleadk; see the integration README for installation and usage.Stop: it now waits
for that cleanup to finish and deadlocks. This includes SimplePlugin.RunContextAfter,
whose callback receives no next function.PurgeStickyWorkflowCache and final-worker
shutdown, no longer increments temporal_sticky_cache_total_forced_eviction. This aligns bulk
cleanup with Java and Core-based SDKs. Qualifying capacity and other per-workflow removals remain
counted, but dashboards may report fewer forced evictions.WorkerOptions.MaxConcurrentWorkflowTaskExternalStorageVisits. Use
ExternalStorage.Concurrency.TestWorkflowEnvironment no longer tries re-resolving the activity name.
This fixes a bug where two closures with different registered names would alias each other.Worker.Stop calls and Worker.Run
wait for worker cleanup, and Run returns the first fatal error even when
interruption races with it.RespondQueryTaskCompletedRequest) now set
WorkflowTaskFailedCause for workflow task failures: PAYLOADS_TOO_LARGE for oversized payloads,
NON_DETERMINISTIC_ERROR for illegal state machine panics, and
WORKFLOW_WORKER_UNHANDLED_FAILURE when the workflow panicked.workflow.WithLocalActivityOptions no longer modifies the RetryPolicy passed in
LocalActivityOptions. It applies the default retry values to a copy, so sharing one policy between
workflows no longer writes to it from several goroutines.RegisterDynamicWorkflow now passes the real options to
OnRegisterDynamicWorkflow, and RegisterDynamicActivity no longer panics when a plugin set
OnRegisterActivity but not OnRegisterDynamicActivity.client.Options.DisableWorkerEnvironmentInfo.converter.ActivitySerializationContext when encoding
and decoding activity payloads: ExecuteActivity (input and static summary/details),
ActivityHandle.Describe (heartbeat details, last failure, and static summary/details), and
ActivityHandle.Get (result and failure).converter.NexusSerializationContext support for Nexus callers and handlers. Callers use
it for inputs, results, and failures; handlers use it for inputs, synchronous results, and
failures. Asynchronous handler results and detached standalone handles are not yet supported.
Standalone USE_EXISTING handles use their start request's context.temporal.NewPayloadValidationError to create non-retryable application errors with
optional structured details for payload validation failures. Passing nil omits details.temporalnexus.NexusClient for starting
workflow-, activity-, and workflow-update-backed Nexus operations.temporal_activity_execution_failed and temporal_local_activity_execution_failed worker
metrics now carry a failure_reason attribute. Each is now split into one time series per
reason, which may affect existing dashboards.client.ActivityHandle now supports operator commands for standalone activities: Pause,
Unpause, UpdateOptions and RestoreOriginalOptions.client.DescribeActivityOptions: IncludeInput,
IncludeOutcome, IncludeHeartbeatDetails and IncludeLastFailure.ExecutionTime and TotalHeartbeatCount.pause,
unpause, updateOptions, restoreOriginal.)client.DescribeActivityOptions: GetHeartbeatDetails (IncludeHeartbeatDetails)
and GetLastFailure (IncludeLastFailure).client.StartActivityOptions.Details option to StaticDetails,
and client.ActivityExecutionDescription.GetDetails to GetStaticDetails.converter.StorageDriverSelector.SelectDriver now receives a
converter.StorageDriverSelectContext instead of a converter.StorageDriverStoreContext.
Update the parameter type; the new type carries the same Context and Target fields.ActivitySerializationContext
(IsLocal=true) instead of the workflow serialization context. Users of a context-aware
DataConverter or PayloadCodec whose encoding depends on the serialization context (for example
context-derived encryption keys or AAD) may fail to decode local activity results recorded in
histories written by earlier SDK versions, both on replay and when continuing an open workflow.workflow.WorkflowRandomStream's Uint64 now derives its value by calling Read
internally instead of the underlying generator's Uint64 method directly, giving Read/Uint64
interleaving on the same stream a stable, well-defined byte ordering (previously undefined per the
standard library ChaCha8.Read doc). This only changes output for a Uint64 call that immediately
follows a Read call whose length is not a multiple of 8 bytes on the same stream; pure Uint64
streams and 8-byte-aligned interleaving are unaffected. Open workflows created on SDK v1.48.0+ that
hit the affected pattern may compute a different value, and therefore may make a different decision,
on replay after upgrading.DataConverter and FailureConverter instead of the converter already carrying
the current workflow context. A context-aware converter that composed contexts (deriving its state
from both the workflow and the activity context) now sees only the activity or child workflow
context, and one whose WithSerializationContext returned a converter that is no longer
context-aware now receives the activity or child workflow context it previously never saw.PayloadDownloadDuration and PayloadUploadDuration fields on the workflow task duration log
now report the wall-clock time external storage was in flight. Previously each batch's duration was
summed, over-reporting the time whenever storage operations ran concurrently.temporal.IsWorkflowExecutionAlreadyStartedError now detects wrapped
serviceerror.WorkflowExecutionAlreadyStarted errors.RespondQueryTaskCompleted instead of
RespondWorkflowTaskFailed, allowing query callers to receive the failure instead of timing out.ActivitySerializationContext
(IsLocal=true) on both ends. Previously the result was encoded with the plain worker data converter
but decoded through the workflow serialization context, so a context-aware DataConverter or
PayloadCodec saw mismatched contexts for local activity results.GetActivityHandleOptions.RunID may be empty to target the latest run, and describe
TerminateActivityOptions.Reason as a termination reason.DefaultFailureConverter.FailureToError now correctly decodes LastHeartbeatDetails for a
reset-workflow failure. Previously the raw payload proto was treated as a single detail value,
so calling Details() on the resulting ApplicationError returned ErrTooManyArg instead of
decoding it.client.Options.ExternalStorage is now stored instead of failing locally with
TMPRL1103. As a consequence, a StorageDriver failure while storing an oversized
query result now fails the workflow task instead of returning a failed query result.-envconfig support to the integration test harness, allowing integration tests to use
standard client settings from contrib/envconfig.client.Options.SdkName and client.Options.SdkVersion to override the SDK name and version reported in worker heartbeats.client.WorkflowRun.GetFirstExecutionRunID to expose the first execution run ID returned by the server when starting a workflow.client.Client.CancelWorkflowWithOptions and client.Client.TerminateWorkflowWithOptions to target a workflow execution chain by its first execution run ID. Cancellation options can also specify a reason.workflow.GetRandomStream for named deterministic pseudorandom values in workflows.workflow.IsReadOnly to report whether the workflow context is in a read-only
path.go.temporal.io/sdk/interceptor/tracing, a reworked tracing interceptor with
corrected span parenting and span directions for span-kind mapping. It backs the new
contrib/opentelemetry-v2 module and is not span-compatible with the tracing interceptor
used by contrib/opentelemetry (v1).OnceCell implementation with sync.OnceValue for lazy workflow run ID lookup.BAD_REQUEST handler error. A temporal.ApplicationError or a nexus.HandlerError is
now propagated to the caller as-is, and any other error is wrapped in a BAD_REQUEST
nexus.HandlerError that retains the original error as its cause. As an exception, a
non-retryable temporal.ApplicationError with type PayloadValidationError is reported as a
BAD_REQUEST nexus.HandlerError with the original error as its cause, since it indicates the
operation input itself is invalid.TestWorkflowEnvironment.MutableSideEffect now honors the provided equals function and only
updates the recorded value when it changes, matching the real worker. Previously it ignored
equals and returned a freshly computed value on every call.client.ExecuteActivity, inbound Nexus request links are forwarded to the activity and the
activity link returned by the server is propagated back to the Nexus operation caller.worker.Options.MaxEagerActivityReservationsPerWorkflowTask to configure the maximum
number of eager activity slots reserved per workflow task. The default remains three. Configured
values must be positive; use DisableEagerActivities to disable eager activity execution.PollerAutoscalingAutoEnroll capability. This only applies to poller types left at their default
(i.e. the worker set neither MaxConcurrent<Type>TaskPollers nor <Type>TaskPollerBehavior);
explicitly configured pollers are left unchanged.worker.Options.PreferredVersionProvider, which can select the version recorded by a
newly encountered workflow.GetVersion call. This supports gradual rollout of a new
GetVersion call before activating its new behavior.ReserveSlot now honors context cancellation while the resource controller is
declining slots. Previously the retry loop observed the context only while the ramp throttle was making
the caller wait, so a poller goroutine could outlive worker shutdown, keeping the worker's stop
WaitGroup from draining and continuing to sample system resources for the life of the process.TryReserveSlot (used for eager task dispatch) no longer blocks for up to
RampThrottle while a concurrent ReserveSlot waits out the ramp throttle. The throttle behavior
is unchanged; only the unnecessary lock contention on the eager path is removed.temporalnexus.MustNewTemporalOperation can now
back an async Nexus operation with a stand-alone activity execution via StartActivity /
StartUntypedActivity. Activity-backed Nexus operations are also supported in TestWorkflowEnvironment.WorkflowDefinitionFactory are now executed via
NewWorkflowDefinition() rather than being wrapped as a function and reflected on (which panicked
with reflect: call of reflect.Value.Call on ptr Value), in both the worker registry and the test
environment. This lets host processes that register a single shared factory (e.g.
roadrunner-temporal / the PHP SDK) use dynamic workflows.NexusOperationCancellationTypeAbandon no longer panic the workflow task when
the operation later starts or completes after the caller is canceled.GetSystemInfo does not report
SDK metadata support.GetSystemInfo UNIMPLEMENTED responses as missing server capability support when
the error indicates an unknown method.Priority on ScheduleWorkflowAction values returned by ScheduleHandle.Describe().workflow.SideEffectWithOptions and workflow.MutableSideEffectWithOptions as valid
deterministic wrappers in workflowcheck.OneTimeVersioningOverride support for workflow start and workflow execution options,
allowing a workflow to route to a target Worker Deployment Version until one Workflow Task
completes there.private to a public package.