@@ -669,6 +669,7 @@ def workflow_continue_as_new(
669
669
retry_policy : Optional [temporalio .common .RetryPolicy ],
670
670
memo : Optional [Mapping [str , Any ]],
671
671
search_attributes : Optional [temporalio .common .SearchAttributes ],
672
+ versioning_intent : Optional [temporalio .workflow .VersioningIntent ],
672
673
) -> NoReturn :
673
674
# Use definition if callable
674
675
name : Optional [str ] = None
@@ -694,6 +695,7 @@ def workflow_continue_as_new(
694
695
search_attributes = search_attributes ,
695
696
headers = {},
696
697
arg_types = arg_types ,
698
+ versioning_intent = versioning_intent ,
697
699
)
698
700
)
699
701
# TODO(cretz): Why can't MyPy infer the above never returns?
@@ -820,6 +822,7 @@ def workflow_start_activity(
820
822
retry_policy : Optional [temporalio .common .RetryPolicy ],
821
823
cancellation_type : temporalio .workflow .ActivityCancellationType ,
822
824
activity_id : Optional [str ],
825
+ versioning_intent : Optional [temporalio .workflow .VersioningIntent ],
823
826
) -> temporalio .workflow .ActivityHandle [Any ]:
824
827
# Get activity definition if it's callable
825
828
name : str
@@ -851,6 +854,7 @@ def workflow_start_activity(
851
854
disable_eager_execution = self ._disable_eager_activity_execution ,
852
855
arg_types = arg_types ,
853
856
ret_type = ret_type ,
857
+ versioning_intent = versioning_intent ,
854
858
)
855
859
)
856
860
@@ -871,6 +875,7 @@ async def workflow_start_child_workflow(
871
875
cron_schedule : str ,
872
876
memo : Optional [Mapping [str , Any ]],
873
877
search_attributes : Optional [temporalio .common .SearchAttributes ],
878
+ versioning_intent : Optional [temporalio .workflow .VersioningIntent ],
874
879
) -> temporalio .workflow .ChildWorkflowHandle [Any , Any ]:
875
880
# Use definition if callable
876
881
name : str
@@ -905,6 +910,7 @@ async def workflow_start_child_workflow(
905
910
headers = {},
906
911
arg_types = arg_types ,
907
912
ret_type = ret_type ,
913
+ versioning_intent = versioning_intent ,
908
914
)
909
915
)
910
916
@@ -1679,6 +1685,10 @@ def _apply_schedule_command(
1679
1685
command .schedule_activity .do_not_eagerly_execute = (
1680
1686
self ._input .disable_eager_execution
1681
1687
)
1688
+ if self ._input .versioning_intent :
1689
+ command .schedule_activity .versioning_intent = (
1690
+ self ._input .versioning_intent ._to_proto ()
1691
+ )
1682
1692
if isinstance (self ._input , StartLocalActivityInput ):
1683
1693
if self ._input .local_retry_threshold :
1684
1694
command .schedule_local_activity .local_retry_threshold .FromTimedelta (
@@ -1810,6 +1820,8 @@ def _apply_start_command(
1810
1820
"temporalio.bridge.proto.child_workflow.ChildWorkflowCancellationType.ValueType" ,
1811
1821
int (self ._input .cancellation_type ),
1812
1822
)
1823
+ if self ._input .versioning_intent :
1824
+ v .versioning_intent = self ._input .versioning_intent ._to_proto ()
1813
1825
1814
1826
# If request cancel external, result does _not_ have seq
1815
1827
def _apply_cancel_command (
@@ -1907,6 +1919,8 @@ def _apply_command(
1907
1919
_encode_search_attributes (
1908
1920
self ._input .search_attributes , v .search_attributes
1909
1921
)
1922
+ if self ._input .versioning_intent :
1923
+ v .versioning_intent = self ._input .versioning_intent ._to_proto ()
1910
1924
1911
1925
1912
1926
def _encode_search_attributes (
0 commit comments