@@ -44,7 +44,7 @@ class WorkerConfig:
44
44
45
45
namespace : str
46
46
task_queue : str
47
- build_id : str
47
+ versioning_strategy : WorkerVersioningStrategy
48
48
identity_override : Optional [str ]
49
49
max_cached_workflows : int
50
50
tuner : TunerHolder
@@ -58,11 +58,56 @@ class WorkerConfig:
58
58
max_activities_per_second : Optional [float ]
59
59
max_task_queue_activities_per_second : Optional [float ]
60
60
graceful_shutdown_period_millis : int
61
- use_worker_versioning : bool
62
61
nondeterminism_as_workflow_fail : bool
63
62
nondeterminism_as_workflow_fail_for_types : Set [str ]
64
63
65
64
65
+ @dataclass
66
+ class WorkerDeploymentVersion :
67
+ """Python representation of the Rust struct for configuring a worker deployment version."""
68
+
69
+ deployment_name : str
70
+ build_id : str
71
+
72
+
73
+ @dataclass
74
+ class WorkerDeploymentOptions :
75
+ """Python representation of the Rust struct for configuring a worker deployment options."""
76
+
77
+ version : WorkerDeploymentVersion
78
+ use_worker_versioning : bool
79
+ default_versioning_behavior : int
80
+ """An enums.v1.VersioningBehavior as an int"""
81
+
82
+
83
+ @dataclass
84
+ class WorkerVersioningStrategyNone :
85
+ """Python representation of the Rust struct for configuring a worker versioning strategy None."""
86
+
87
+ build_id : str
88
+
89
+
90
+ @dataclass
91
+ class WorkerVersioningStrategyDeploymentBased :
92
+ """Python representation of the Rust struct for configuring a worker versioning strategy deployment-based."""
93
+
94
+ options : WorkerDeploymentOptions
95
+
96
+
97
+ @dataclass
98
+ class WorkerVersioningStrategyLegacyBuildIdBased :
99
+ """Python representation of the Rust struct for configuring a worker versioning strategy legacy Build ID-based."""
100
+
101
+ build_id : str
102
+
103
+
104
+ WorkerVersioningStrategy : TypeAlias = Union [
105
+ WorkerVersioningStrategyNone ,
106
+ WorkerVersioningStrategyDeploymentBased ,
107
+ WorkerVersioningStrategyLegacyBuildIdBased ,
108
+ ]
109
+
110
+
66
111
@dataclass
67
112
class ResourceBasedTunerConfig :
68
113
"""Python representation of the Rust struct for configuring a resource-based tuner."""
0 commit comments