aws/k8s smoke test
parent
77bcf7975c
commit
a45f79e918
|
@ -4018,6 +4018,7 @@ const async_wait_until_1 = __importDefault(__nccwpck_require__(41299));
|
|||
const follow_log_stream_service_1 = __nccwpck_require__(64121);
|
||||
class KubernetesTaskRunner {
|
||||
static runTask(kubeConfig, kubeClient, jobName, podName, containerName, namespace, alreadyFinished = false) {
|
||||
var _a;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
cloud_runner_logger_1.default.log(`Streaming logs from pod: ${podName} container: ${containerName} namespace: ${namespace}`);
|
||||
const stream = new stream_1.Writable();
|
||||
|
@ -4102,7 +4103,7 @@ class KubernetesTaskRunner {
|
|||
stream.destroy();
|
||||
}
|
||||
cloud_runner_logger_1.default.log('k8s task runner failed');
|
||||
cloud_runner_logger_1.default.log(JSON.stringify(error, undefined, 4));
|
||||
cloud_runner_logger_1.default.log(JSON.stringify(((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.body) || error, undefined, 4));
|
||||
}
|
||||
cloud_runner_logger_1.default.log('end of log stream');
|
||||
return output;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -107,12 +107,12 @@ class KubernetesTaskRunner {
|
|||
);
|
||||
throw new Error(`No logs streamed from k8s`);
|
||||
}
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (stream) {
|
||||
stream.destroy();
|
||||
}
|
||||
CloudRunnerLogger.log('k8s task runner failed');
|
||||
CloudRunnerLogger.log(JSON.stringify(error, undefined, 4));
|
||||
CloudRunnerLogger.log(JSON.stringify(error?.response?.body || error, undefined, 4));
|
||||
}
|
||||
CloudRunnerLogger.log('end of log stream');
|
||||
|
||||
|
|
Loading…
Reference in New Issue