File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 1+ import orchestrator_service_pb2 as pb
2+
3+
14class VersionFailureException (Exception ):
2- pass
5+ def __init__ (self , error_details : pb .TaskFailureDetails ) -> None :
6+ super ().__init__ ()
7+ self .error_details = error_details
38
49
510class AbandonOrchestrationError (Exception ):
6- def __init__ (self , * args : object ) -> None :
7- super ().__init__ (* args )
11+ pass
Original file line number Diff line number Diff line change @@ -970,7 +970,6 @@ def execute(
970970 )
971971
972972 ctx = _RuntimeOrchestrationContext (instance_id , self ._registry )
973- version_failure = None
974973 try :
975974 # Rebuild local state by replaying old history into the orchestrator function
976975 self ._logger .debug (
@@ -992,8 +991,8 @@ def execute(
992991
993992 except pe .VersionFailureException as ex :
994993 if self ._registry .versioning and self ._registry .versioning .failure_strategy == VersionFailureStrategy .FAIL :
995- if version_failure :
996- ctx .set_failed (version_failure )
994+ if ex . error_details :
995+ ctx .set_failed (ex . error_details )
997996 else :
998997 ctx .set_failed (ex )
999998 elif self ._registry .versioning and self ._registry .versioning .failure_strategy == VersionFailureStrategy .REJECT :
@@ -1062,7 +1061,7 @@ def process_event(
10621061 f"Error action = '{ self ._registry .versioning .failure_strategy } '. "
10631062 f"Version error = '{ version_failure } '"
10641063 )
1065- raise pe .VersionFailureException
1064+ raise pe .VersionFailureException ( version_failure )
10661065
10671066 # deserialize the input, if any
10681067 input = None
You can’t perform that action at this time.
0 commit comments