improve error handling k8s
parent
3280fcf57f
commit
25ba74d06e
|
@ -3374,7 +3374,7 @@ class Kubernetes {
|
|||
continue;
|
||||
}
|
||||
else {
|
||||
cloud_runner_logger_1.default.log(`error running k8s workflow ${error}`);
|
||||
cloud_runner_logger_1.default.log(`error running k8s workflow ${JSON.parse(error)}`);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
@ -4076,13 +4076,11 @@ class KubernetesTaskRunner {
|
|||
throw new Error(`No logs streamed from k8s`);
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
catch (_a) {
|
||||
if (stream) {
|
||||
stream.destroy();
|
||||
}
|
||||
cloud_runner_logger_1.default.log(JSON.stringify(error));
|
||||
cloud_runner_logger_1.default.log('k8s task runner failed');
|
||||
throw error;
|
||||
}
|
||||
cloud_runner_logger_1.default.log('end of log stream');
|
||||
return output;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -192,7 +192,7 @@ class Kubernetes implements ProviderInterface {
|
|||
await new Promise((resolve) => resolve(5000));
|
||||
continue;
|
||||
} else {
|
||||
CloudRunnerLogger.log(`error running k8s workflow ${error}`);
|
||||
CloudRunnerLogger.log(`error running k8s workflow ${JSON.parse(error)}`);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,13 +106,11 @@ class KubernetesTaskRunner {
|
|||
);
|
||||
throw new Error(`No logs streamed from k8s`);
|
||||
}
|
||||
} catch (error) {
|
||||
} catch {
|
||||
if (stream) {
|
||||
stream.destroy();
|
||||
}
|
||||
CloudRunnerLogger.log(JSON.stringify(error));
|
||||
CloudRunnerLogger.log('k8s task runner failed');
|
||||
throw error;
|
||||
}
|
||||
CloudRunnerLogger.log('end of log stream');
|
||||
|
||||
|
|
Loading…
Reference in New Issue