Skip to content

Commit 28be770

Browse files
authored
Deprecate versioning intents (#1970)
1 parent 2fb80f2 commit 28be770

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

internal/worker_version_sets.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ const UnversionedBuildID = ""
1616
// VersioningIntent indicates whether the user intends certain commands to be run on
1717
// a compatible worker build ID version or not.
1818
//
19+
// Deprecated: Build-id based versioning is deprecated in favor of worker deployment based versioning
20+
//
1921
// Exposed as: [go.temporal.io/sdk/temporal.VersioningIntent]
2022
type VersioningIntent int
2123

@@ -24,6 +26,8 @@ const (
2426
// behavior for the type of command, accounting for whether the command will be run on the same
2527
// task queue as the current worker.
2628
//
29+
// Deprecated: Build-id based versioning is deprecated in favor of worker deployment based versioning
30+
//
2731
// Exposed as: [go.temporal.io/sdk/temporal.VersioningIntentUnspecified]
2832
VersioningIntentUnspecified VersioningIntent = iota
2933
// VersioningIntentCompatible indicates that the command should run on a worker with compatible
@@ -45,12 +49,16 @@ const (
4549
// Workflow triggering it, and not use Assignment Rules. (Redirect Rules are still applicable)
4650
// This is the default behavior for commands running on the same Task Queue as the current worker.
4751
//
52+
// Deprecated: Build-id based versioning is deprecated in favor of worker deployment based versioning
53+
//
4854
// Exposed as: [go.temporal.io/sdk/temporal.VersioningIntentInheritBuildID]
4955
VersioningIntentInheritBuildID
5056
// VersioningIntentUseAssignmentRules indicates the command should use the latest Assignment Rules
5157
// to select a Build ID independently of the workflow triggering it.
5258
// This is the default behavior for commands not running on the same Task Queue as the current worker.
5359
//
60+
// Deprecated: Build-id based versioning is deprecated in favor of worker deployment based versioning
61+
//
5462
// Exposed as: [go.temporal.io/sdk/temporal.VersioningIntentUseAssignmentRules]
5563
VersioningIntentUseAssignmentRules
5664
)

internal/workflow.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,9 @@ type (
427427

428428
// VersioningIntent specifies whether this child workflow should run on a worker with a
429429
// compatible build ID or not. See VersioningIntent.
430+
//
431+
// Deprecated: Build-id based versioning is deprecated in favor of worker deployment based versioning
432+
//
430433
// WARNING: Worker versioning is currently experimental
431434
VersioningIntent VersioningIntent
432435

temporal/build_id_versioning.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,23 @@ import "go.temporal.io/sdk/internal"
44

55
// VersioningIntent indicates whether the user intends certain commands to be run on
66
// a compatible worker build ID version or not.
7+
//
8+
// Deprecated: Build-id based versioning is deprecated in favor of worker deployment based versioning
9+
//
710
// WARNING: Worker versioning is currently experimental
11+
//
12+
//lint:ignore SA1019 ignore for SDK
813
type VersioningIntent = internal.VersioningIntent
914

1015
const (
1116
// VersioningIntentUnspecified indicates that the SDK should choose the most sensible default
1217
// behavior for the type of command, accounting for whether the command will be run on the same
1318
// task queue as the current worker.
19+
//
20+
// Deprecated: This has the same effect as [VersioningIntentInheritBuildID], use that instead.
21+
//
1422
// WARNING: Worker versioning is currently experimental
23+
//lint:ignore SA1019 ignore for SDK
1524
VersioningIntentUnspecified = internal.VersioningIntentUnspecified
1625
// VersioningIntentCompatible indicates that the command should run on a worker with compatible
1726
// version if possible. It may not be possible if the target task queue does not also have
@@ -29,11 +38,19 @@ const (
2938
// VersioningIntentInheritBuildID indicates the command should inherit the current Build ID of the
3039
// Workflow triggering it, and not use Assignment Rules. (Redirect Rules are still applicable)
3140
// This is the default behavior for commands running on the same Task Queue as the current worker.
41+
//
42+
// Deprecated: This has the same effect as [VersioningIntentInheritBuildID], use that instead.
43+
//
3244
// WARNING: Worker versioning is currently experimental
45+
//lint:ignore SA1019 ignore for SDK
3346
VersioningIntentInheritBuildID = internal.VersioningIntentInheritBuildID
3447
// VersioningIntentUseAssignmentRules indicates the command should use the latest Assignment Rules
3548
// to select a Build ID independently of the workflow triggering it.
3649
// This is the default behavior for commands not running on the same Task Queue as the current worker.
50+
//
51+
// Deprecated: This has the same effect as [VersioningIntentInheritBuildID], use that instead.
52+
//
3753
// WARNING: Worker versioning is currently experimental
54+
//lint:ignore SA1019 ignore for SDK
3855
VersioningIntentUseAssignmentRules = internal.VersioningIntentUseAssignmentRules
3956
)

workflow/workflow_options.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ func GetChildWorkflowOptions(ctx Context) ChildWorkflowOptions {
6161

6262
// WithWorkflowVersioningIntent is used to set the VersioningIntent before constructing a
6363
// ContinueAsNewError with NewContinueAsNewError.
64+
//
65+
// Deprecated: Build-id based versioning is deprecated in favor of worker deployment based versioning
6466
func WithWorkflowVersioningIntent(ctx Context, intent temporal.VersioningIntent) Context {
6567
return internal.WithWorkflowVersioningIntent(ctx, intent)
6668
}

0 commit comments

Comments
 (0)