Highlights
Added
- Added experimental
workflow.GetRandomStreamfor named deterministic pseudorandom values in workflows. - Added experimental
workflow.IsReadOnlyto report whether the workflow context is in a read-only path. - Added
client.Options.SdkNameandclient.Options.SdkVersionto override the SDK name and version reported in worker heartbeats. - Added
client.WorkflowRun.GetFirstExecutionRunIDto expose the first execution run ID returned by the server when starting a workflow. - Added
client.Client.CancelWorkflowWithOptionsandclient.Client.TerminateWorkflowWithOptionsto target a workflow execution chain by its first execution run ID. Cancellation options can also specify a reason. - Added
go.temporal.io/sdk/interceptor/tracing, a reworked tracing interceptor with corrected span parenting and span directions for span-kind mapping. It backs the newcontrib/opentelemetry-v2module and is not span-compatible with the tracing interceptor used bycontrib/opentelemetry(v1).
Changed
- Improved the performance of yield-heavy workloads by eliminating unnecessary computation and heap allocations.
- Replaced the internal
OnceCellimplementation withsync.OnceValuefor lazy workflow run ID lookup.
Fixed
- Data converter errors raised while deserializing Nexus operation input are no longer replaced with a generic
BAD_REQUESThandler error. Atemporal.ApplicationErroror anexus.HandlerErroris now propagated to the caller as-is, and any other error is wrapped in aBAD_REQUESTnexus.HandlerErrorthat retains the original error as its cause. As an exception, a non-retryabletemporal.ApplicationErrorwith typePayloadValidationErroris reported as aBAD_REQUESTnexus.HandlerErrorwith the original error as its cause, since it indicates the operation input itself is invalid. - Prevent workflow task failures when an activity with a custom ID completes while its cancellation command is pending.
TestWorkflowEnvironment.MutableSideEffectnow 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.- Nexus operation link propagation for stand-alone activities: when a Nexus operation handler uses
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.
What's Changed
- Fix Pending Activity cancellation is not removed after completion when using a custom Activity ID by @Quinn-With-Two-Ns in #2513
- Print only test failures by default, full logs in files by @yuandrew in #2510
- Honor equals function in test env MutableSideEffect by @PardhuTI in #2516
- fix: add TMPRL1105 prefix to extstore error by @jmaeagle99 in #2515
- feat: allow overriding SDK name/version in worker heartbeats by @xepozz in #2511
- perf: replace runtime.CallersFrames in isPanicking with FuncForPC by @brucearctor in #2336
- contrib: add Google Cloud Storage driver for external payload storage by @brucearctor in #2366
- Bump golang.org/x/crypto from 0.51.0 to 0.52.0 in /contrib/gcp/gcsdriver/gcssdk by @dependabot[bot] in #2534
- [AI-383] contrib/googleadk: add replay-safe OpenTelemetry provider wrappers by @DABH in #2514
- Replace internal OnceCell with OnceValue by @Quinn-With-Two-Ns in #2541
- feat: add workflow.GetRandomStream and workflow.IsReadOnly by @patbeqo in #2521
- Add CancelWorkflowWithOptions and TerminateWorkflowWithOptions by @Quinn-With-Two-Ns in #2543
- fix(extstore): correct minimum Go SDK requirement to v1.43.1 by @jmaeagle99 in #2551
- Refactor integration test client creation by @dplyukhin in #2544
- chore: update driver change logs with release dates by @jmaeagle99 in #2555
- fix: correct change log version 1.47.0 by @jmaeagle99 in #2556
- Use synctest for tests by @yuandrew in #2548
- Add script to prepare new releases by @dplyukhin in #2523
- Configure test-focused linters by @yuandrew in #2561
- Add envconfig support to integration test harness by @THardy98 in #2539
- Add testify suite assertion lifecycle check by @yuandrew in #2553
- Expose First Execution Run on WorkflowRun by @Quinn-With-Two-Ns in #2542
- feat(opentelemetry): add support for OTEL v2 by @patbeqo in #2475
- Fix double sending link on SAA by @Quinn-With-Two-Ns in #2525
- Document pull request template by @yuandrew in #2575
- Run checks for contrib modules by @yuandrew in #2558
- Propagate data converter errors from Nexus input deserialization by @bergundy in #2549
New Contributors
Full Changelog: v1.47.0...v1.48.0