@@ -1679,6 +1679,11 @@ class DynamicTimeHooks(PipelineRunnerHooks):
16791679 def __init__ (self ) -> None :
16801680 super ().__init__ ()
16811681 self .prepare_run_arguments_calls = 0
1682+ self .submit_errors : list [str ] = []
1683+
1684+ def on_submit_error (self , error , * , context ):
1685+ del context
1686+ self .submit_errors .append (str (error ))
16821687
16831688 def read_pipeline_yaml (self , pipeline_path ):
16841689 return {
@@ -1720,6 +1725,7 @@ def pipeline_runs_list(self, **kwargs: Any) -> dict[str, Any]:
17201725 assert result ["context" ].root_execution_id == "exec-created"
17211726 assert result ["context" ].metadata ["recovered_after_submit_error" ] is True
17221727 assert hooks .prepare_run_arguments_calls == 1
1728+ assert hooks .submit_errors == []
17231729 assert len (client .created ) == 1
17241730 submission_id = client .created [0 ]["annotations" ]["tangle-cli/submission-id" ]
17251731 assert submission_id
@@ -1739,6 +1745,11 @@ class DynamicTimeHooks(PipelineRunnerHooks):
17391745 def __init__ (self ) -> None :
17401746 super ().__init__ ()
17411747 self .prepare_run_arguments_calls = 0
1748+ self .submit_errors : list [str ] = []
1749+
1750+ def on_submit_error (self , error , * , context ):
1751+ del context
1752+ self .submit_errors .append (str (error ))
17421753
17431754 def read_pipeline_yaml (self , pipeline_path ):
17441755 return {
@@ -1779,6 +1790,7 @@ def pipeline_runs_list(self, **kwargs: Any) -> dict[str, Any]:
17791790
17801791 assert result ["response" ]["id" ] == "run-2"
17811792 assert hooks .prepare_run_arguments_calls == 1
1793+ assert hooks .submit_errors == ["submit timed out" ]
17821794 assert [body ["root_task" ]["arguments" ]["exec_time" ] for body in client .created ] == ["time-1" , "time-1" ]
17831795 assert [body ["root_task" ]["componentRef" ]["spec" ]["name" ] for body in client .created ] == [
17841796 "run-time-1" ,
0 commit comments