Releases: temporalio/sdk-go
v1.16.0
Highlights
Eager Activity Execution
Internal optimization that, once enabled on the server, will optimize activity execution by favoring the local activity worker before a remote one.
Specific Changes
2022-06-16 - 706af97 - Update API dep for worker versioning API (#831)
2022-06-22 - 5217d7a - Rename internal_decision_state_machine.go to internal_command_state_machine (#835)
2022-06-22 - 9879dbc - Encode nil query result (#830)
2022-06-28 - 1f60198 - Returning error from Workflow results in Failure (#838)
2022-06-30 - 6a0e7ab - Eager activity execution (#836)
2022-06-30 - 6c4061e - Add interceptors to replayer options (#839)
2022-06-30 - bca4a07 - Add client-side helper to get history from JSON reader (#840)
2022-07-01 - 2f76f4d - Allow any value in the OnUpsertSearchAttribute mock (#841)
2022-07-08 - 3856292 - Concurrency and serialization documentation notes (#848)
2022-07-12 - 7003c83 - Add workflow.GetInfo(ctx).GetCurrentHistoryLength() (#851)
2022-07-13 - c728c6b - Forward compatibility for service proxy (#849)
2022-07-13 - de63fea - Pull in v1.10.0 of go.temporal.io/api (#852)
2022-07-14 - 16cc53e - Support alias disabling during workflow/activity registration (#850)
2022-07-15 - 942edfb - Links updated (#856)
2022-07-21 - 8fe4ad9 - Properly handle absent WFT response for eager activities (#862)
2022-07-22 - dea0cfa - Support really short heartbeat throttling interval (#863)
2022-07-31 - 7151653 - Add workflow update handling (#869)
2022-08-01 - 38b2b69 - Consume api v1.11.0 (#872)
2022-08-05 - 0f9d428 - Unit test fix for Go 1.19 (#877)
v1.15.0
Highlights
Worker fatal errors
Previously when a worker had a fatal error, it sent a SIGINT to its own PID. Now it will stop the worker. If running worker.Worker.Run()
, it will return the error and it will also call worker.Options.OnFatalError
.
Eager and lazy client API updates
client.NewClient
has been deprecated in favor of the clearer client.Dial
and client.NewLazyClient
. The former does an eager connection and the latter waits until first call made.
- Deprecated
client.NewClient
in favor ofclient.Dial
orclient.NewLazyClient
- Add
client.Client.CheckHealth
call - Properly return fatal error
GitHub actions
The project has moved from BuildKite to GitHub actions for all CI builds.
Specific Changes
2022-03-21 - b06c84a - Update docstring to use public alias for workflow.Execution
(#752)
2022-03-22 - 55cf584 - Allow remote codec dataconverter to modify request. (#757)
2022-03-24 - 48b3cb9 - GitHub CI action (#760)
2022-03-28 - 567257b - Support OpenMetric-style naming (#756)
2022-03-28 - 5d7ddae - Add cloud test to CI (#763)
2022-03-30 - 1fc476f - Expose underlying message on a few errors (#766)
2022-03-31 - fd0d1eb - Fix histogram naming in prometheus naming scope for tally (#770)
2022-04-13 - 8651550 - Update golang.org/x/tools for 1.18 fix (#776)
2022-04-13 - b866ba9 - Allow data converters to be created without deadlock detection (#772)
2022-04-13 - d10ca68 - SetOnActivityHeartbeatListener on TestActivityEnvironment (#771)
2022-04-19 - 4c3044f - Fix template recursion in workflowcheck (#782)
2022-04-19 - 779d3b2 - Properly paginate when using service for replayer (#783)
2022-04-21 - 8a9ab9a - Remove namespace field from ScheduleActivityTaskCommandAttributes message (#787)
2022-04-21 - a8ef494 - Minor doc fixes (#788)
2022-04-22 - 4e64c51 - Update api reference (#790)
2022-04-25 - 1c9c022 - Fixes for activities in test suite (#780)
2022-04-25 - 7cbd079 - Add task queue to worker metrics (#785)
2022-04-26 - 68a3c41 - Fix goroutine/memory leak on query-only poll responses (#779)
2022-04-29 - 3a2b86e - Use NamespaceNotFound error (#799)
2022-05-02 - 8f11375 - Support disabling run following for workflow results (#791)
2022-05-03 - 7c3777a - Properly set non-determinism as task failure cause (#798)
2022-05-04 - 1db665f - Update max payload size to 128 MB (#796)
2022-05-06 - 3e0b1b5 - Handle FAILED_CAUSE_NAMESPACE_NOT_FOUND (#801)
2022-05-06 - ee5ae6f - Deprecate NewClient, add Dial and NewLazyClient and CheckHealth (#795)
2022-05-06 - fdb99eb - Expose fatal worker error and stop signaling/killing process (#800)
2022-05-13 - 7ccfda6 - Update go.temporal.io/api dependency (#806)
2022-05-16 - d6384b6 - Add update-go-sum target (#807)
2022-05-23 - 41cd853 - Remove BuildKite, add coveralls to GH actions, cleanup other files (#811)
2022-05-25 - 54f4148 - Make mutable side effects work during replay (#809)
2022-05-31 - 4c19b78 - Ignore termination event (#819)
2022-05-31 - e0c50db - Ignore workflow package during determinism checks (#820)
2022-06-03 - 17c0144 - Update go.temporal.io/api to 1.8.0 (#824)
2022-06-06 - e9dd80f - Call OnFatalError for workers using Start (#823)
v1.14.0
Highlights
💥 Breaking changes have been made to remove a couple of advanced options and to do slight renames in the converter
package for encoders. See below for details
Replace Client Health Checking
Previously, by default creating a client would use the gRPC health check on the server to ensure it was available or would fail client creation. Due to now needing information about what the server can/can't do, we make a different call to obtain that info instead of the health check call on client creation.
This change should not be visible to most users. However, we have removed the advanced client.ConnectionOptions.DisableHealthCheck
and associated health check options from that struct. This no longer applies since there is no health check. This also means currently all clients make an eager connection to the server as they always had by default.
Advanced Encoding Updates
We have renamed the recently added converter.PayloadEncoder
to converter.PayloadCodec
for cross-SDK clarity and did similar for other "encoder" parts. This codec is focused on byte-to-byte conversion during data conversion. It can be used in a converter.CodecDataConverter
to transform bytes for encryption, compression, and/or anything else.
We have added a few utilities to aid those wanting to do custom encoding in a more central place:
- We have added a gRPC interceptor in the
converter
package that, when used for a custom proxy, will transparently encode and decode payloads given a codec - We have added a gRPC proxy in the
client
package that can be registered with a gRPC server to proxy requests to a Temporal server (which can then use the aforementioned interceptor to do encoding/decoding) - We have added the ability to expose a codec over HTTP for use with a remote data converter that will let you encode/decode remotely (for expected use from the browser UI and
tctl
for centralized end-to-end encryption)
Specific Changes
2022-02-22 - 22369cb - Fix markdown syntax. (#734)
2022-02-22 - 3f45616 - Do not serialize empty OpenTracing spans (#729)
2022-02-22 - 621fd1e - Support ignore comment alongside godoc (#731)
2022-02-22 - 856f5c2 - Adjust HTTP protocol to take Payloads not Payload. (#733)
2022-02-22 - a7d8c1a - Set workflow start time for tests on workflow info (#735)
2022-02-22 - e96a9d9 - Disallow MaxConcurrentWorkflowTaskPollers to be set to 1 (#727)
2022-02-28 - c82b73d - Fix activity cancellation race when not cancelling workflow (#741)
2022-03-01 - c3eb5b0 - Replace health checking with server-capability getter and disable retries on internal errors (#706)
2022-03-01 - d409984 - Allow replayer to use local activities with string names (#745)
2022-03-02 - 2c5ed0f - GRPC Service Proxy and Encoding Interceptor (#738)
2022-03-07 - 8cb1963 - Disable timeout retries during session creation (#746)
2022-03-09 - 8608a59 - Rename PayloadEncoder -> PayloadCodec. (#749)
2022-03-10 - 2a582f8 - Add mock call assertions to TestWorkflowEnvironment (#748)
v1.13.1
Highlights
This is a bug-fix patch release.
Bug fix - context cancellation concurrency
In #721 we fixed an issue where two context cancellations may cause a concurrent map read during rare cases.
Bug fix - activity cancellation when already completed
In #726 we fixed a race condition that occurs when activities are completed while cancellations are attempted.
Specific Changes
2022-02-07 - b1c3a91 - Add workflow/activity start time and activity ID to tracing interceptor spans (#715)
2022-02-07 - b5ba1d3 - Support trace logger in workflows & activities (#714)
2022-02-09 - 1837657 - Fix cancellation race condition (#721)
2022-02-11 - edacacb - Address rare custom resolver test race (#725)
2022-02-15 - 69da258 - Add a helper for serving a payload encoder over HTTP. (#717)
2022-02-18 - 2c19379 - Remove pending activity cancellations when activity completion occurs (#726)
v1.13.0
Highlights
Disable workflow worker
Now, workers can be used as activity-only workers only by setting worker.Options.DisableWorkflowWorker
as true
.
Static analysis tool
See https://github.com/temporalio/sdk-go/tree/master/contrib/tools/workflowcheck
Specific Changes
2021-12-08 - feae29e - Updated SDK version in nested modules (#663)
2021-12-13 - 63bd738 - Support configurable/default heartbeat default/max intervals. (#660)
2021-12-15 - 5e5645f - Header/tracing support for signals and queries (#631)
2021-12-16 - 48386f8 - Support pointer-to-pointer in channel receive (#673)
2021-12-16 - f1153c0 - Set workflow ID from start options in testsuite if given (#674)
2022-01-03 - c281f6a - Address flaky grpc dial and open telemetry tests (#680)
2022-01-04 - 638b0ed - Debug mode does not set the DeadlockDetectionTimeout (#681)
2022-01-05 - 4d67625 - Fix flakiness with OpenTelemetry integration test (#684)
2022-01-06 - 8c434bc - Set Fossa to run non-blocking in buildkite (#683)
2022-01-07 - c32b047 - Add note for OnActivity about method references (#691)
2022-01-13 - 0fa6692 - Add metadata.messageType to protobuf payloads (#693)
2022-01-14 - 93e91e5 - Only respond with activity cancellation when requested by server (#690)
2022-01-18 - 0a00199 - Add ability to disable workflow worker (#689)
2022-01-18 - 147569c - Propagate retry policy for continue-as-new based on the original retry policy (#696)
2022-01-18 - 9616e90 - Increase log level of heartbeat errors (#694)
2022-01-31 - 37f56f0 - Static analysis tool for determinism checking (#702)
2022-01-31 - 4915b0c - Add note for context-aware data converters (#699)
2022-01-31 - cb9c7de - Log poll failures at a higher level (#708)
v1.12.0
Highlights
💥 There are breaking changes in this release for interceptors, tracing, and metrics. See below for more details.
Interceptor Redesign
The entire package of interceptors
has changed to interceptor
and now includes many more forms of interceptors beyond just the workflow ones before. The workflow interceptor has also been reworked to match other SDKs.
A new option has been added for client.Options.Interceptors
that accepts client-level and worker-level interceptors.
The worker.Options.WorkflowInterceptorChainFactories
option has been removed and replaced with Interceptors
that accepts worker-level interceptors.
Tracing
In previous versions, OpenTracing was configured via client.Options.Tracer
. This option has been removed and tracing is now implemented for both OpenTracing and OpenTelemetry via interceptors in separate modules in go.temporal.io/sdk/contrib/opentracing
and go.temporal.io/sdk/contrib/opentelemetry
respectively.
If you had previously done:
client.Options.Tracer = myOpenTracingTracer
You would now go get go.temporal.io/sdk/contrib/opentracing
and:
tracingInterceptor, err := opentracing.NewInterceptor(opentracing.TracerOptions{Tracer: myOpenTracingTracer})
if err != nil {
return err
}
client.Options.Interceptors = append(client.Options.Interceptors, tracingInterceptor)
A similar approach is taken with OpenTelemetry. This allows use of your choice of tracing implementation without requiring the primary SDK module to have a dependency on OpenTracing or OpenTelemetry.
Metrics
In previous versions, Tally was configurable directly in client.Options.MetricsScope
, available for use inside workflows via workflow.GetMetricsScope
, and available for use inside activities via activity.GetMetricsScope
.
Now, metrics have been abstracted into a client.MetricsHandler
and the client options and calls for obtaining it have changed. Tally has been moved to a separate module at go.temporal.io/sdk/contrib/tally
with implementation of client.MetricsHandler
.
If you had previously done:
client.Options.MetricsScope = myTallyScope
You would now go get go.temporal.io/sdk/contrib/tally
and:
client.Options.MetricsHandler = tally.NewMetricsHandler(myTallyScope)
Also, if you had previously used the Temporal metrics scope to record your own metrics using workflow.GetMetricsScope
and/or activity.GetMetricsScope
, now you would use workflow.GetMetricsHandler
and/or activity.GetMetricsHandler
respectively.
Note, the new client.MetricsHandler
interface does not abstract histograms as Tally does. If you must still use Temporal-based metrics scope inside of workflows/activities and use histograms, the scope can be re-obtained via tally.ScopeFromHandler
. However, for workflows it does not properly skip recording metrics during replay like the previous Tally implementation did. You will need to check for replay before recording the histogram. See tally.ScopeFromHandler documentation for more details.
This abstraction allows use of your choice of metrics implementations without requiring the primary SDK module to have a dependency on Tally.
gRPC Exposure
client.Client
now exposes the raw gRPC workflow service via WorkflowService()
. Also, client.Options.ConnectionOptions.DialOptions
accept gRPC dial options for advanced use cases.
Previously, gRPC was a hidden implementation detail. To match other SDKs, gRPC has been made visible so developers can do advanced gRPC-specific things.
Specific Changes
2021-11-15 - 00a6c49 - Document ambiguous ID and test for mismatch on signal start (#612)
2021-11-15 - 059ec4f - Interceptor Redesign/Rewrite and OpenTelemetry/Opentracing Implementation (#610)
2021-11-16 - 39861e4 - Add a request ID to cancel and signal calls (#633)
2021-11-18 - 4e224d6 - Fix issue for zero-values of pointer arguments in workflows. (#640)
2021-11-19 - be507a3 - Add ability to not wait on child workflows in test suite. (#632)
2021-11-23 - 3eee985 - Update Tally (#652)
2021-11-23 - 651c63c - Add task pool slots remaining metric (#637)
2021-11-23 - 7aac310 - Add mmcshane to CODEOWNERS (#649)
2021-11-23 - 9424898 - Fixed worker.New docs. (#634)
2021-12-01 - f9d61f2 - Add debug log for all errors received from RecordActivityHeartbeat (#657)
2021-12-02 - 6c694d5 - Add GetLogger method to Tracer interface (#655)
2021-12-02 - 960d3e9 - Fix invalid command ID expectation on child workflow cancel (#647)
2021-12-02 - a707cbc - Expose gRPC (#651)
2021-12-03 - 7125db9 - Add a little detail on when heartbeat is seen from the activity side (#650)
2021-12-07 - c453756 - Metrics/tracing dependency abstraction and multi-module repository (#653)
v1.11.1
Highlights:
- Fix state machine bug that occurs when actions happen after activity cancellation
2021-10-27 - 91235fc - Add bergundy and cretz to list of codeowners (#606)
2021-11-09 - 384e906 - Catch panics in local activities (#622)
2021-11-10 - ae4e3f3 - Bounds check stack trace line indexes (#626)
2021-11-12 - 60db9dc - State machine issue after activity cancellation (#625)
v1.11.0
2021-09-15 - f39757a - Accept interface{} in ByteSlicePayloadConverter (#531)
2021-09-16 - 16bb227 - Start worker even when no workflow/activity registered (#539)
2021-09-17 - 4efeaca - Integration test for local activity retry and workflow heartbeat (#541)
2021-09-17 - ca2954d - Fix local activity retry backoff (#540)
2021-09-21 - 099f80a - Flaky integ test fixes (#542)
2021-09-22 - 80d6163 - Add Dmitry Spikhalskiy to codeowners (#544)
2021-09-23 - 196e3d4 - Adjust timeouts for heartbeat integration test (#545)
2021-09-27 - a5735f7 - Add a test which double checks some cancel-on exit behavior (#559)
2021-09-29 - c354f32 - Skip failing test on Windows (#561)
2021-09-30 - 89c81a3 - Apply default retry policy for local activities (#566)
2021-10-04 - e739f51 - Improve test success when server is slow (fixes #556 and fixes #547) (#565)
2021-10-06 - 4a53bc0 - Confirmation of duplicate workflow ID behavior while running (see #518) (#574)
2021-10-06 - a4c4243 - fix minor typo "loger" (#499)
2021-10-06 - c36d07c - Upgrade github.com/uber-go/tally to v4.0.1. This version is identical to v3.4.2, but uses go.mod. (#562)
2021-10-07 - 2c0af69 - Allow errors in signal interceptors (#564)
2021-10-07 - b52191f - Activity success e2e latency metrics (#575)
2021-10-08 - 662d4c6 - Fix heartbeats recording on activity failure (#578)
2021-10-12 - 47b28b9 - Update error type names in documentation (#584)
2021-10-14 - e24f673 - Make child-workflow-already-started error programmatically discoverable (#581)
2021-10-14 - f33117f - Add unit test for replay with side effect (#590)
2021-10-18 - 345e00b - Support custom converter on workflow replayer (#583)
2021-10-18 - 6bbdd9e - Fix issue where new task was not returned in sticky-disabled scenarios (#589)
2021-10-18 - e38f09d - Store activity result on graceful worker stop (#579)
2021-10-18 - fbe7741 - Document and test custom resolvers (#585)
2021-10-19 - ad43584 - Allow future to unmarshal into pointer of same pointer type set (#593)
2021-10-19 - e168840 - Fix issue with LRU max cache size (#591)
2021-10-20 - 3b59754 - Fix command ordering issue on child workflow cancel (#588)
2021-10-25 - aee63e5 - Change verb to correct type of error (#597)
2021-10-26 - f73a232 - Generic encoding converter with initial zlib implementation (#599)
v1.10.0
2021-08-06 - d12226a - Problems with workflow cancel & command resolutions in same WFT (#504)
2021-08-11 - 233adc6 - Improve error message for proto payload converters (#509)
2021-08-15 - 2c7ca78 - Fixed misleading BackgroundActivityContext comment. (#516)
2021-08-19 - 106f3c7 - Add converter context for client heartbeat and completion calls (#519)
2021-08-29 - 0c69423 - Allow pending goroutines exit after workflow completion (#520)
2021-09-02 - 91e6bd2 - Add inbound interceptors for Signal and Query (#522)
2021-09-03 - 041f5c7 - Follow new execution chain for other event types also (#527)
v1.9.0
Highlights:
- Expose Maybe() on mock calls (#489)
- Add local activity info into local activity logger/tracer (#498)
- Add field accessors for ActivityError (#508)
2021-07-12 - 479826a - Do not allow starting child workflows from an already-cancelled context (#485)
2021-07-15 - db65a29 - Expose Maybe() on mock calls (#489)
2021-07-19 - 82447e4 - Change docker hub repo to temporaliotest (#490)
2021-07-20 - 7abca66 - Fix data race due to deadlock detector (#494)
2021-07-20 - c156fec - Prevent panic from reflect (#493)
2021-07-28 - 6d79cfd - Add local activity info into local activity logger/tracer (#498)
2021-07-29 - 4ba9e5c - Poller backoff a bit more in errors (#501)
2021-08-02 - 6fe2ed7 - Reduce retry aggressivness (#506)
2021-08-03 - 75c27df - Add automatic retry to fossa scans (#507)
2021-08-04 - b735e08 - Add field accessors for ActivityError (#508)