v1.27.0
Reset workflow with Updates
The Go SDK now supports reapplying Workflow Updates when resetting a workflow execution.
Note: Support for reapplying updates on workflow reset require a server version ≥1.24.0
Request failure code labeled metrics
gRPC request failure metrics (*request_failure
) emitted by the Go SDK now include the error status code as a tag under status_code
. This can be disabled by setting DisableErrorCodeMetricTags
on client.Options
.
See also: #1472
💥 BREAKING CHANGES
This release includes some breaking changes for the experimental features Workflow Update and Worker Versioning. Users of these features should read the release notes carefully before upgrading.
Workflow Update (Experimental)
Based on users feedback this release makes some breaking changes to the Workflow Update API used by client and workflows code.
Client API changes
- Merged
Client.UpdateWorkflowWithOptions
andClient.UpdateWorkflow
into one API calledClient.UpdateWorkflow
that takes aclient.UpdateWorkflowOptions
struct. WaitPolicy
inclient.UpdateWorkflowOptions
was replaced withWaitForStage
.WaitForStage
is now a required parameter inclient.UpdateWorkflowOptions
.WaitForStage
is now properly respected byClient.UpdateWorkflow
. PreviouslyClient.UpdateWorkflow
may have returned a handle before the desiredWaitForStage
was reached.
Workflow API changes
workflow.SetUpdateHandler
andworkflow.SetUpdateHandlerWithOptions
Now require update handles to take aworkflow.Context
as the first argument.workflow.GetUpdateInfo
has been renamed toworkflow.GetCurrentUpdateInfo
.
Worker Versioning (Experimental)
Worker Versioning is a pre-release, experimental feature that simplifies managing code changes by allowing you to peg workflows to build versions. This change revamps and improves the API and deprecates the existing experience.
The new APIs introduced with worker versioning are:
GetWorkerVersioningRules
returns assignment and redirect rules for a given task queue.UpdateWorkerVersioningRules
updates assignment and redirect rules for a given task queue.DescribeTaskQueueEnhanced
extends the functionality ofDescribeTaskQueue
with workflow reachability status.
A few APIs associated with legacy worker versioning have been deprecated:
UpdateWorkerBuildIdCompatibility
replaced byUpdateWorkerVersioningRules
.GetWorkerBuildIdCompatibility
replaced byGetWorkerVersioningRules
.GetWorkerTaskReachability
replaced byDescribeTaskQueueEnhanced
.
Note: These new Worker Versioning APIs require a server version ≥1.24.0
Internally call grpc.NewClient
instead of grpc.Dial
Internally the SDK now calls grpc.NewClient
instead of grpc.Dial
because it was deprecated in google.golang.org/grpc
This should be a transparent change to most users, google.golang.org/grpc
does call out one subtle difference:
One subtle difference between NewClient and Dial and DialContext is that the former uses "dns" as the default name resolver, while the latter use "passthrough" for backward compatibility. This distinction should not matter to most users, but could matter to legacy users that specify a custom dialer and expect it to receive the target string directly.
Some deprecated dial options like WithBlock
, WithTimeout
, WithReturnConnectionError
, and FailOnNonTempDialError
are now ignored by grpc.NewClient
. See https://github.com/grpc/grpc-go/blob/master/Documentation/anti-patterns.md for more context.
See also: #1488
Child workflows now properly Continue-As-New in the TestWorkflowEnvironment
In previous version of the Go SDK when a child workflow running in the test environment tried to continue as new the parent workflow would receive an error from the child workflow. Now the child workflow properly continues as new and the parent workflow will not receive an error.
See also: #1437
Specific Changes
2024-04-12 - c4bf074 - datadog: Add tracer option to check error eligibility in the span (#1438)
2024-04-17 - 69bc6c3 - Update reapply (#1436)
2024-04-23 - 93c08b0 - Ensure consistent labels for rpc metrics (#1444)
2024-04-24 - 8361067 - Disable UTF8-invalid tests when running CLI dev server (#1448)
2024-04-30 - fe44a47 - Improve error message for missing body (#1451)
2024-05-01 - d051de6 - Option to redirect devserver stdout/stderr to a file (#1452)
2024-05-09 - 386a6d3 - Require update handler to have a context (#1457)
2024-05-09 - ded70a3 - Add support for NextRetryDelay for local activities (#1456)
2024-05-10 - 81cd5dc - Fix QueryRejectCondition parameter in QueryWorkflowWithOptions (#1461)
2024-05-10 - c69831e - Remove DisableStickyExecution (#1464)
2024-05-14 - 3b68c6d - Add request failure code label to metrics (#1472)
2024-05-17 - aa17647 - get-free-port: prevent duplicate ports on Linux (#1478)
2024-05-21 - 06c0ebc - Add SetFailureConverter
to the activity and workflow test environments (#1484)
2024-05-21 - 222d4cf - Fix gauge metrics with latest otel SDK (#1482)
2024-05-21 - 725b428 - Only record activity_succeed_endtoend_latency on success (#1481)
2024-05-21 - fb06909 - Send original update request back in response (#1480)
2024-05-22 - bf2c79d - Switch to using Float64Gauge in otel integration (#1485)
2024-05-24 - a6ca6a5 - Replace grpc.Dial with grpc.NewClient (#1488)
2024-05-28 - bcfa85a - Workflow update client API refactor (#1489)
2024-05-31 - 486c233 - Minor logger improovments (#1495)
2024-05-31 - 4dd1ed8 - Fix bugs when using a custom FailureConverter
in tests (#1490)
2024-06-06 - 0df7ad5 - Bump GitHub Actions (#1503)
2024-06-06 - 17193aa - Manually copy proxy options (#1502)
2024-06-06 - 5c171b7 - Make backfill tests more robust (#1504)
2024-06-06 - 9ecb2a4 - Change GetUpdateInfo to GetCurrentUpdateInfo (#1505)
2024-06-06 - bf29944 - testsuite.StartDevServer: Respect timeout during dial (#1498)
2024-06-07 - c73a007 - Support the new versioning API (#1494)
2024-06-10 - d4ff1f6 - Fix flake in TestUpdateAdmittedNoWorker (#1506)
2024-06-12 - 38fe879 - Always run all the versioning tests (#1510)
2024-06-12 - a7c8208 - Allow SDK to handle speculative WFT with command events (#1509)
2024-06-13 - 2720358 - Improve CI action (#1512)
2024-06-13 - 30a29ce - Add integration test for reset with update events (#1507)
2024-06-13 - 4c8b9e1 - Update API to v1.34.0 (#1511)