Skip to content

Releases: temporalio/sdk-go

v1.18.1

10 Nov 20:07
34f71ac
Compare
Choose a tag to compare

Highlights

Failure Converters

We have added a new API to allow users to customize how errors are serialized and de-serialized to failures.

Schedule API (experimental)

We have added a new API to help users run workflows against a provided schedule.

Specific Changes

2022-09-20 - 077e261 - Skip upsert memo integration tests (#914)
2022-09-21 - 754b253 - Do not call ResetSticky on force eviction (#915)
2022-09-28 - a6a8749 - Support backing off more for resource exhausted (#917)
2022-09-30 - e6a06f2 - Add support for custom failure converters (#924)
2022-10-12 - 14df12c - Add IdempotencyKey start span option (#931)
2022-10-19 - 3f3eca4 - Do not set idempotency key for HandleQuery (#934)
2022-10-31 - 40f7da0 - Add resource exhausted metric with cause (#940)
2022-10-31 - 67b4c87 - Don't use data converter if search attribute value is of Payload type (#913)
2022-11-03 - 66eb848 - Adapt to interaction-based upstream API changes (#944)
2022-11-03 - 97ed634 - Set default max eager activities to 3 (#946)
2022-11-07 - 620fa72 - Provide better custom logger example in README (#911)
2022-11-09 - 8ab62d9 - Add schedule API (#943)
2022-11-10 - 133a6a0 - Remove default limit of overall max eager activities and add max per task (#952)

v1.18.0

09 Nov 21:27
d82b001
Compare
Choose a tag to compare

(outdated, see v1.18.1)

v1.17.0

09 Sep 15:21
c1ce1d2
Compare
Choose a tag to compare

Highlights

Connection sharing across clients

A new function is available, client.NewClientFromExisting that can create a client using the same connection as an existing client and a new set of non-connection options.

Upsert memo

Similar to workflow.UpsertSearchAttribute which mutates search attributes from inside the workflow, there is now workflow.UpsertMemo which mutates the workflow memo from inside the workflow. This is only usable with Temporal server versions 1.18+.

Workflow channel utilities

Two new utilities for channels inside of workflow: Channel.Len which is similar to len(ch) in Go, and Channel.ReceiveWithTimeout which supports timing out a channel receive.

Specific Changes

2022-08-10 - 8d5582c - Doc fixes (#879)
2022-08-10 - f150e45 - Share connection across different clients (#881)
2022-08-19 - 3d111e3 - Spawn update coro directly through dispatcher (#885)
2022-08-29 - 74a1b73 - Fix code samples for workflow.SideEffect (#890)
2022-08-29 - 85978da - Fix doc formatting (#892)
2022-08-30 - 7f1b18f - Stop logging poller errors after stop (#894)
2022-08-30 - b5942ae - Sync batch operations api (#889)
2022-09-01 - d1f860c - Handle Client.Close on cloned clients (#893)
2022-09-01 - f4f143c - Expose OperatorService client (#902)
2022-09-02 - e7905ec - Make Worker.Stop reentrant (#906)
2022-09-06 - d884fe6 - Update CODEOWNERS to temporalio/sdk team (#905)
2022-09-07 - 9341009 - Add UpsertMemo API (#883)
2022-09-08 - ffa7590 - Added Channel.Len and Channel.ReceiveWithTimeout (#895)

v1.16.0

08 Aug 17:53
e26b342
Compare
Choose a tag to compare

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

07 Jun 14:38
cee305f
Compare
Choose a tag to compare

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 of client.Dial or client.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

10 Mar 16:17
706516c
Compare
Choose a tag to compare

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

18 Feb 15:06
2c19379
Compare
Choose a tag to compare

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

01 Feb 20:02
5773685
Compare
Choose a tag to compare

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

08 Dec 16:24
dff25ea
Compare
Choose a tag to compare

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

12 Nov 14:11
c7944b6
Compare
Choose a tag to compare

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)