@@ -95,13 +95,13 @@ IComponent {
9595 }
9696 } ;
9797 }
98- async dispatch ( config : InstanceConfig , instancesServerPort : number , instanceId : string , sequenceInfo : SequenceInfo , payload : RunnerConnectInfo ) : Promise < void > {
98+ async dispatch ( config : InstanceConfig , instancesServerPort : number , instanceId : string , sequenceInfo : SequenceInfo , payload : RunnerConnectInfo ) : Promise < number > {
9999 if ( config . type !== "kubernetes" ) {
100100 throw new Error ( `Invalid config type for kubernetes adapter: ${ config . type } ` ) ;
101101 }
102102
103103 if ( this . adapterConfig . quotaName && await this . kubeClient . isPodsLimitReached ( this . adapterConfig . quotaName ) ) {
104- throw Error ( RunnerExitCode . PODS_LIMIT_REACHED . toString ( ) ) ;
104+ return RunnerExitCode . PODS_LIMIT_REACHED ;
105105 }
106106
107107 this . limits = config . limits ;
@@ -163,7 +163,7 @@ IComponent {
163163 // This means runner pod was unable to start. So it went from "Pending" to "Failed" state directly.
164164 // Return 1 which is Linux exit code for "General Error" since we are not able
165165 // to determine what happened exactly.
166- return ;
166+ return RunnerExitCode . UNCAUGHT_EXCEPTION ;
167167 }
168168
169169 this . logger . debug ( "Copy sequence files to Runner" ) ;
@@ -176,6 +176,8 @@ IComponent {
176176 await this . kubeClient . exec ( runnerName , runnerName , [ "unpack.sh" , "/package" ] , process . stdout , this . stdErrorStream , compressedStream , 2 ) ;
177177
178178 this . logger . debug ( "Copy command done" ) ;
179+
180+ return 0 ;
179181 }
180182
181183 async waitUntilExit ( _config : InstanceConfig , instanceId : string , _sequenceInfo : SequenceInfo ) : Promise < ExitCode > {
0 commit comments