Skip to main content

Cadence Go Client

Cadence follows semantic versioning and you can find more information about changes between version on the Cadence changelog.

Latest release for General Availability

v1.2.9 published on 2024-03-01

Major Releases

v1.2.x

v1.1.x

v1.0.x

v0.19.x

v0.18.x

v0.17.x

v0.16.x

v0.15.x

v0.14.x

v0.13.x

v0.12.x

v0.11.x

v0.10.x


Release v1.2.10 published by ketsiambaku on 3/22/2024

What's Changed

New Contributors

Full Changelog: https://github.com/uber-go/cadence-client/compare/v1.2.9...v1.2.10-rc.3


Release v1.2.9 published by ketsiambaku on 3/1/2024

What's Changed

Full Changelog: https://github.com/uber-go/cadence-client/compare/v1.2.8...v1.2.9


Release v1.2.8 published by jakobht on 2/27/2024

What's Changed

New Contributors

Full Changelog: https://github.com/uber-go/cadence-client/compare/v1.2.7...v1.2.8-rc.1


Release v1.2.7 published by timl3136 on 12/11/2023

What's Changed

Changed

  • Upgraded cassandra image to 4.1.3 in docker compose files #1301

Fixed

  • Fixed history size exposure logging #1300

Full Changelog: https://github.com/uber-go/cadence-client/compare/v1.2.6...v1.2.7


Release v1.2.6 published by arzonus on 11/24/2023

What's Changed

Added

  • Added a new query type __query_types #1295
  • Added calculate workflow history size and count and expose that to client #1270
  • Added honor non-determinism fail workflow policy #1287

Full Changelog: https://github.com/uber-go/cadence-client/compare/v1.1.0...v1.2.6


Release v1.1.0 Release published by shijiesheng on 11/9/2023

What's Changed

Added

  • Added new poller thread pool usage metrics #1275 #1291
  • Added metrics tag workflowruntimelength in workflow context #1277
  • Added GetWorkflowTaskList and GetActivityTaskList APIs #1292

Changed

  • Updated idl version
  • Improved retrieval of binaryChecksum #1279

Fixed

  • Fixed error log #1284
  • Fixed in TestEnv workflow interceptor is not propagated correctly for child workflows #1289

New Contributors

Full Changelog: https://github.com/uber-go/cadence-client/compare/v1.0.2...v1.1.0


Release v1.0.2 release published by jakobht on 9/25/2023

Added

  • Add a structured error for non-determinism failures

Changed

  • Do not log when automatic heart beating fails due to cancellations

Full Changelog: https://github.com/uber-go/cadence-client/compare/v1.0.1...v1.0.2


Release v1.0.1 release published by 3vilhamster on 8/14/2023

Added

Changed

  • Updated supported Go version to 1.19
  • Log when the automatic heartbeating fails
  • Updated golang.org/x/net and github.com/prometheus/client_golang

Full Changelog: https://github.com/uber-go/cadence-client/compare/v1.0.0...v1.0.1


Release v1.0.0 published by Groxx on 7/12/2023

We are v1.0!

What does this mean?!

At the moment, not much. This is largely to mirror the v1.0 release in the server.

Importantly, v1.0 does not imply any change to backwards compatibility - the current policy is still "best effort with some obvious exceptions" (like new methods on the service client interface).
Going by previous version patterns, this would have been labeled v0.20.0 as it is a relatively incremental change off of v0.19.1.

Coming soon(ish): v2

We are planning on releasing a v2 of this client! There will likely be more v1 changes first though.

v0 / v1 has been boxed in a bit by backwards compatibility requirements and a few leaky APIs (aliases, exposed thrift objects, etc). This has been making some desired changes difficult or nigh-impossible.

Because of this, v2 is intended largely as a cleanup so we can make larger internal changes without interrupting our users. We will be intentionally avoiding major semantic changes, and you will be able to and encouraged to use v1 and v2 side by side to gradually migrate. We'll be relying on this v1+v2 ability internally quite a bit, to migrate our monorepo :) Workflow histories should remain backwards compatible, but code will require some simple and generally-obviously-correct changes, and previously-opt-in features may become opt-out or simply disappear in favor of the new behavior.

When this occurs, it will essentially signal the end of feature development on v1. We will likely make exceptions for IDL changes (largely due to the shared IDL repository, which protobuf effectively requires us to use) and easily-backport-able bugfixes, but this will end at some point. Due to this, you will definitely be encouraged to migrate ASAP, so you can eliminate the v1 dependency.

We'll have migration details written up in detail when it's ready.

Changes since v0.19.1

Full Changelog: https://github.com/uber-go/cadence-client/compare/v0.19.1...v1.0


Release v0.19.1 release published by mantas-sidlauskas on 6/3/2022

Changed

  • Client will not retry on LimitExceededError #1170

Release v0.19.0 release published by vytautas-karpavicius on 1/5/2022

Added

  • Added JWT Authorization Provider. This change includes a dependency that uses v2+ go modules. They no longer match import paths, meaning that we have to drop support for dep & glide in order to use this. #1116

Changed

  • Generated proto type were moved out to cadence-idl repository. This is BREAKING if you were using compatibility package. In that case you will need to update import path from go.uber.org/cadence/.gen/proto/api/v1 to github.com/uber/cadence-idl/go/proto/api/v1 #1138

Documentation

  • Documentation improvements for client.SignalWorkflow #1151

Release Retract v0.18.4 and publish v0.18.5 published by Groxx on 11/9/2021

Unfortunately v0.18.4 found issues after further tests, so that version is now retracted. Go modules users should skip over v0.18.4 automatically.

This version is broadly the same, so those release notes are repeated below, and these commits have been changed: Added: e9e7447b1b38215340d8a8a8faa483b8e5bdac9a Formatting, scoping test logs to individual tests (#1142) Reverted: 0fb34ee81bd8c395f71c9e9d8e2351101c12b211 Bi-directional Proto<->Thrift converter (#1130)


This release is primarily bugfixes and minor additions, with one possibly-significant exception:

#1138 and #1144 fix a bug which results in changed semantics, so workflows which had been relying on the buggy behavior may fail to resume. We expect that workflows encountering this bug will be rare (it took over two years to be noticed!), but it will of course depend on your exact workflow code.

See workflow.Bugports for detailed information, including both a workaround (to mimic the old behavior's semantics, if your workflow relies on it) and a temporary compatibility flag which can be applied selectively. Since this increases the internal complexity, this (and future) "bugfix backports" will likely be removed relatively quickly, e.g. along with the next v0.N+1 release (v0.19.0 in this case, or possibly later). Please prioritize migrating if you encounter this!


Bugfixes and improvements: f90b46c3079822f358d5995b86641fb06042befd + 4d64c0175c809768fc4428bc0089bfeb2451fb63 + 9871428fa3ea1e198322d8e88f4bd4dece95311e Fix a long-standing bug where canceled workflow contexts would still start child workflows. (#1138, #1144) 1d7aa6439a6b40880d88906aa4b017d754baa4de Improved canceled-context docs (#1134) b886df3c35eba4085b2b6beb73a9f87e47f71f29 Added cadence.IsWorkflowError(err) for easier error handling when getting workflow results (#1145) 7044e1d8a3d2f193e2648590bdb2c4cd7f06eb95 Better locking in workflow.Context to prevent races (#1141) (core issue remains, but this prevents many in practice) bfbc369f201ca3e4fcfea323902efc8c7ac09283 More-unique worker IDs to prevent UI collisions (#1135) 75506d3756e624e601db415d322d40d41b7117c6 Fix a child-workflow panic after reset (#1118)

Internals: e9e7447b1b38215340d8a8a8faa483b8e5bdac9a Formatting, scoping test logs to individual tests (#1142) 7de3d62aba04ca5f45a548806d4464e7b0887ea7 Test fix (#1140) 0fb34ee81bd8c395f71c9e9d8e2351101c12b211 Bi-directional Proto<->Thrift converter (#1130) reverted, caused panics


Release Retracted, do not use: v0.18.4 release published by Groxx on 11/8/2021

This release is primarily bugfixes and minor additions, with one possibly-significant exception:

#1138 and #1144 fix a bug which results in changed semantics, so workflows which had been relying on the buggy behavior may fail to resume. We expect that workflows encountering this bug will be rare (it took over two years to be noticed!), but it will of course depend on your exact workflow code.

See workflow.Bugports for detailed information, including both a workaround (to mimic the old behavior's semantics, if your workflow relies on it) and a temporary compatibility flag which can be applied selectively. Since this increases the internal complexity, this (and future) "bugfix backports" will likely be removed relatively quickly, e.g. along with the next v0.N+1 release (v0.19.0 in this case, or possibly later). Please prioritize migrating if you encounter this!


Bugfixes and improvements: f90b46c3079822f358d5995b86641fb06042befd + 4d64c0175c809768fc4428bc0089bfeb2451fb63 + 9871428fa3ea1e198322d8e88f4bd4dece95311e Fix a long-standing bug where canceled workflow contexts would still start child workflows. (#1138, #1144) 1d7aa6439a6b40880d88906aa4b017d754baa4de Improved canceled-context docs (#1134) b886df3c35eba4085b2b6beb73a9f87e47f71f29 Added cadence.IsWorkflowError(err) for easier error handling when getting workflow results (#1145) 7044e1d8a3d2f193e2648590bdb2c4cd7f06eb95 Better locking in workflow.Context to prevent races (#1141) (core issue remains, but this prevents many in practice) bfbc369f201ca3e4fcfea323902efc8c7ac09283 More-unique worker IDs to prevent UI collisions (#1135) 75506d3756e624e601db415d322d40d41b7117c6 Fix a child-workflow panic after reset (#1118)

Internals: 7de3d62aba04ca5f45a548806d4464e7b0887ea7 Test fix (#1140) 0fb34ee81bd8c395f71c9e9d8e2351101c12b211 Bi-directional Proto<->Thrift converter (#1130)


Release v0.18.3 release published by Groxx on 10/6/2021

This release is mostly a number of bugfixes and documentation improvements.

Of particular note:

The Yarpc upgrade should be safe for basically everyone, and it removes the need to pin github.com/apache/thrift to an old version - the required old version is now correctly inherited from Yarpc. More details can be seen in Yarpc's PR: https://github.com/yarpc/yarpc-go/pull/2075 This partially corrects a number of version-related issues, e.g. #523 , #812 , #1107 , and part of #1129 . Since Go modules cannot prevent an upgrade, they cannot be stopped entirely, but it should prevent them from occurring for users who do not already depend on a newer thrift.

If you encounter test failures due to logic in defer running where it did not previously: your tests likely depended on the bug fixed in #1117 . The behavior now matches production more closely, so please update your tests.

And last but not least: Selector and Channel docs are now significantly more detailed. Please consider reading them!


Bugfixes and improvements: 222e0cb Add DecisionTaskStartedEventID to workflowInfo (#1127) 982628d Improve check for invalid pollForDecisionTaskResponse (#1122) 332c2b4 Fix client side race condition (#1124) b2db20e Close the test dispatcher when completing (#1117) 167c643 Use the same timer duration validation with server (#1121) b32ef3e Minor cleanup (#1106)

Documentation: 2e7438c Enhancing docs for selector and channel, from feedback and careful testing (#1137) 8c34519 Filling out Selector docs, and some adjacent ones I noticed (#1131) 2017e60 Add documentation for Selector (#1115)

Upgrades: ae45c0f Bump yarpc to 1.55.0 (#1110)


Release v0.18.2 Release published by vytautas-karpavicius on 8/25/2021

New Features

  • gRPC compatibility layer d432c1f Thrift2Grpc compatibility layer (#1105) eb5bff7 Compatibility layer fix (#1120)
  • Feature flags 61495d9 Support feature flags in client (#1103)
  • IsCron support 97f887f Update client idls to support IsCron (#1095)

Bug fixes & improvements

ed86b8a Clear workflow state when not cached and not complete (#1111) 16d20b1 Truncate history for query based on nextEventID (#1096) 94b0e07 Ignore workflowPanicError in query task and add warn logs (#1094) 2b88fb1 Relax nondeterministc check (#1093)

Other

88d9c90 Increment library version to 0.18 (#1108) ca6e026 Decouple Client from worker part of SDK (#1100) 037a846 Update yarpc to the latest version (#1091)


Release v0.17.0 Release published by yux0 on 4/27/2021

Breaking changes

WorflowExecutionAlreadyCompletedError

EntityNotExistError splits into EntityNotExistError and WorflowExecutionAlreadyCompletedError in SignalWorkflowExecution, TerminateWorkflowExecute and CancelWorkflowExecution APIs. EntityNotExistError will be returned if the workflow is not in the history. This could happen if the workflow never starts or the workflow completes and passes the retention days. WorflowExecutionAlreadyCompletedError will be returned if the workflow is in the history and is completed.

  • 65903f7 Add workflow already completed error to client (#1081)
  • d9fa282 Handle workflow already completed in heartbeat (#1086)

New features

Auto heartbeat

  • 5282e89 Activity Registration Option to automatically record activity heartbeats (#1053)
  • 9486c19 Enable auto-heartbeat for replayWorkflowActivity (#1088)

Traffic shadowing worker

  • ae9b964 Visibility query builder for workflow shadower (#1055)
  • 7829ee0 Workflow shadower (#1058)
  • a7ab9d6 Separate test for workflow replayer (#1061)
  • 78399b4 Workflow shadower activity implementation (#1062)
  • 529722b Update IDL for workflow shadower (#1063)
  • d39d9ab Implement shadower worker (#1064)
  • fff7f18 Add wait period between scan iterations (#1065)
  • 9daccb2 Propagate shadow worker start error (#1068)
  • 1bf0fd7 Set default shadow workflow status to OPEN (#1070)
  • dd3ec45 Improve workflow replayer (#1082)
  • c903538 Make shadowOptions optional in workerOptions (#1087)

Workflow delay start

  • 48589fc DelayStart param cadence client changes (#1079)

Misc improvements & bug fixes

  • 00508cd Ensure min number of scan workflow result for shadowing (#1084)
  • 57463a9 Fix nil user context for activity (#1080)
  • b1375e6 Fix logging and metric tags used by shadow worker (#1076)
  • fcc703e Update client repo idls commit hash (#1073)
  • 7f92111 Minor cleanup of a test file (#1071)
  • f929adc Fix the problem of ignoring the detail parameter in TerminateWorkflow function (#1066)
  • 7e65cc2 Minor test enhancement for local activity retries (#1069)
  • 42f6cac Pin versions with go.mod, similar to server (#1060)
  • 3008b97 Update LICENSE for 2021 (#1059)

Release v0.16.0 Release published by meiliang86 on 2/10/2021

Misc improvements & bug fixes

  • Add Reset option to skip signal reapply (#1032)
  • Fix panic in defer after cache eviction. (#1048)
  • Testsuite: Support interceptors in child workflows mocks (#1039)
  • Make logger of test workflow environment changeable (#1036)
  • Relocate workflow and activity registration functions to separate interfaces (#1034)
  • Add missing workflowtype and activitytype metric tags (#1049)
  • Fix registry already registered check (#1054)

Release v0.15.0 Release published by mkolodezny on 12/3/2020

New features

  • Allow worker to dispatch activity tasks through local tunnel after decisions are made. This is a performance optimization option to skip activity scheduling efforts. (#1028 #1029 #1030 #1037)

Misc improvements & bug fixes

  • Fix mockgen issue on name conflict (#1024)
  • Do not start workers if no activities or workflows are registered (#1031)
  • Support Cron Schedule as part of the TestWorkflowEnvironment (#1020)
  • Enable query timeout of 20 seconds (#1038)

Release v0.14.1 Release published by yux0 on 10/1/2020

Bug Fixes

  • ecf10b1 Fix UpsertSearchAttributes mocking (#1027)

Release v0.14.0 Release published by yux0 on 9/30/2020

Bug Fixes

  • d0966cf Calculate SchdeuleToCloseDeadline from current attempt instead of first attempt (#1022)
  • 46e2e86 Fix mock error in OnUpsertSearchAttributes (#1017)
  • 15ec566 unmask deserialization error in getNextPage history (#1019)
  • 73287b6 Fix decode issue for local activities returnin nil result (#943) (#1011)
  • ba95013 Update license headers
  • f3ee023 Increase timeout values to prevent test flakiness (#165)
  • a94ee70 Call cancel on context to prevent memory leak (#156)
  • 7254208 Cancel context to free resources (#147)
  • 1485006 Add tests for activity struct arg (#134)
  • 8b4cd48 Update comment for GetWorkflowResult (#1009)
  • 84482ec Move ErrorDetailsValues to error.go (#1008)
  • 4abefdd Update docs link for go client (#1003)
  • efd4582 Fixed Windows compilation failure (#998)

Release v0.13.4 Release published by vytautas-karpavicius on 7/28/2020

Bug fixes

  • Fix workflow replay to ignore -fm suffix (#1014)

Release v0.13.3 Release published by vytautas-karpavicius on 7/24/2020

Backwards compatibility fix

  • Fix registry to resolve functions with -fm suffix (#1012)

Release Release v0.13.2 published by vytautas-karpavicius on 7/20/2020

Bug fixes

  • Relax ErrorDetailsValues types matching (#1005)

Release v0.13.1 Release published by vytautas-karpavicius on 7/15/2020

Bug fixes

  • Fix GetWorkflowResult to return nil instead of ErrNoData (#1000)
  • Fix local activity marker handler (#1002)
  • Fix decoded panic when testing CustomError (#999)

Release v0.13.0 Release published by vytautas-karpavicius on 7/13/2020

New features

  • Merge workflow interceptor changes (#976)
  • Add Context Propagation support for Local Activities (#986)
  • Fixes for struct activity naming (#992)
  • Backwards compatible activity type names (#994)

Misc improvements & bug fixes

  • Fix aggressive poller for non-retriable error (#977)
  • Fix workflow and activity registration race (#980)
  • TestSuite support for ChildWorkflow Context Propagation (#983)
  • UseNumber for the json defaultDataConverter (#988)
  • Update go docs for WithActivityOptions and related methods (#989)
  • Add helper function for GetBinaryChecksum (#991)
  • Pass retry policy when completing with continue as new (#995)

Refactorings

  • First attempt to cleanup worker code. (#982)
  • Misc Renaming (#984)

Utilities

  • Add github templates for bug, feature and PR (#978)
  • Fix fossa script (#985)

Release 0.12.1 Release published by yux0 on 6/3/2020

Misc fixes and improvements

  • Support returning WorkflowExecutionAlreadyStartedError in tests (#969)
  • Expose WithRetryPolicy in workflow package (#974)
  • Fix workflow and activity registration race (#980)

Release v0.12.0 Release published by andrewjdawson2016 on 5/19/2020

New features

Feature version

  • Bump feature version to 1.6.0 (#958)

Workflow.Await

  • Add comment for Await (#973)
  • Added workflow.Await(...) support (#967)

Get raw history for long poll

  • Integrate With New Get History Raw API (#857) (#938)

Workflow and activity registration improvements

  • Activity and workflow registration refactoring (#962)

Misc fixes and improvements

  • Fix inconsistent Jaeger baggage injection/extraction (#972)
  • Retry getHistory request from passive cluster in case of replication lag (#952)
  • Fix comment on signalWithStart (#968)
  • Improve session framework heartbeat mechanism (#965)
  • doc: explain how to abandon child workflows (#963)
  • Add TerminateIfRunning IDReusePolicy (#966)
  • Reduce maxRPCTimeout to 5s for sync API calls (#960)
  • Let workflow.now() to always return time in UTC (#959)
  • Add comment on GetWorkflow (#957)
  • Update cadence-idl to use task list for visibility data (#955)
  • Add fossa analyze config and script (#953)
  • Add comments for decoding memo and search attr (#950)
  • Fix error log for async activity task (#949)
  • Delete unused worker option AutoHeartBeat (#941)
  • Adding IsWorkflowExecutionAlreadyStartedError helper (#946)

Release v0.11.2 Release published by yycptt on 3/7/2020

Bug Fixes

  • worker_options: expose poller count as a user option (#940)
  • Add missing info population in the activity info. (#936) (#937)
  • #936 followup: remove breaking test framework change, add integration test (#948)

Release v0.11.0 Release published by anish531213 on 2/21/2020

<h4>New Features</h4> <ul> <li>Support consistency query (#871)</li> <li>Support customizing binary checksum (#847)</li> <li>add options to respond query task completed (#881)</li> <li>Make session heartbeat timeout customizable (#930)</li> </ul> <h4> Bug Fixes</h4> <ul> <li>Fixed liner errors and gofmt (#876)</li> <li>Stabilize retry timeout error with customer error on activity startToCloseTimeout (#878)</li> <li>Fix testsuite handling of context deadline error (#882)</li> <li>Fix deterministic check for searchable change version (#889)</li> <li>Fix localactivity should not retry on CancelError (#890)</li> <li>Fixed testsuite handling of unregistered activity (#892)</li> <li>Fix an un-locked access to the activities map (#903)</li> <li>Fix binary checksum race condition and lack of err handling (#900)</li> <li>Work around pborman data race (#902)</li> <li>Fix testsuite race condition during activity retry (#914)</li> <li>Fix nil pointer exception when retrying local activity (#913)</li> <li>Fix potential go-routine leak when retrying local activity (#918)</li> </ul> <h4>Mics</h4> <ul> <li>Add consistency level to query IDL (#868) </li> <li>Drop query results that exceed size limit (#879)</li> <li>Increase RPC timeout for list archived workflow API (#880)</li> <li>Update library and feature version (#883)</li> <li>Reduce query size limit (#886)</li> <li>Log an error message when an activity results in an non-nil error (#894)</li> <li>Patch lib version 0.10.1 (#896)</li> <li>Minor: use correct testing.T in tests / teardown (#895)</li> <li>Stop checking for goroutine leaks more quickly if possible (#897)</li> <li>Change ExecuteUntilAllBlocked to return an error, rather than a pointer (#905)</li> <li>Remove unused helper method in tests (#898)</li> <li>Remove another un-locked access to activity func map (#904) </li> <li>Revert "Change ExecuteUntilAllBlocked to return an error, rather than a pointer (#905)</li> <li>Adding binary checksum to RespondDecisionTaskFailedRequest (#891)</li> <li>history_event_iterator: added sanity check to detect missing events (#907 )</li> <li>Sticky task list name uniqueness per poller (#910)</li> <li>history_iterator: add validation to make sure all events until startedEventID are applied (#911)</li> <li>Add staticcheck and errcheck to the makefile (#909)</li> <li>Change ExecuteUntilAllBlocked to return an error (#908)</li> <li>Consistent query test (#916)</li> <li>Update idl for getClusterInfo and listTaskListPartition API (#921)</li> <li>Parallelizing some tests (#899)</li> <li>Use cadence-idl repo IDL storage (#923)</li> <li>Update .gitmodules (#932)</li> <li>Update jeager client (#934)</li> <li>update to 0.11 for new client release (#919)</li> </ul>

Release v0.10.5 Release published by yux0 on 12/20/2019

Patch bug fixes:

  1. Fix testsuite race condition during activity retry (#914)
  2. Fix nil pointer exception when retrying local activity (#913)
  3. Fix potential go-routine leak when retrying local activity (#918)


For a comprehensive list of changes and detailed release notes, please visit the Cadence Go Client GitHub Releases page.