aws/k8s smoke test

pull/496/head
Frostebite 2023-02-15 21:12:23 +00:00
parent 2e2fe56bbe
commit 75e32ff76e
3 changed files with 12 additions and 5 deletions

7
dist/index.js generated vendored
View File

@ -3350,12 +3350,15 @@ class Kubernetes {
output += yield kubernetes_task_runner_1.default.runTask(this.kubeConfig, this.kubeClient, this.jobName, this.podName, 'main', this.namespace); output += yield kubernetes_task_runner_1.default.runTask(this.kubeConfig, this.kubeClient, this.jobName, this.podName, 'main', this.namespace);
const running = yield kubernetes_pods_1.default.IsPodRunning(this.podName, this.namespace, this.kubeClient); const running = yield kubernetes_pods_1.default.IsPodRunning(this.podName, this.namespace, this.kubeClient);
if (!running) { if (!running) {
const podStatus = yield kubernetes_pods_1.default.GetPodStatus(this.podName, this.namespace, this.kubeClient); status = yield kubernetes_pods_1.default.GetPodStatus(this.podName, this.namespace, this.kubeClient);
cloud_runner_logger_1.default.log(`Pod not found, assumed ended!`); cloud_runner_logger_1.default.log(`Pod not found, assumed ended!`);
if (follow_log_stream_service_1.FollowLogStreamService.DidReceiveEndOfTransmission && podStatus === `Succeeded`) { if (!follow_log_stream_service_1.FollowLogStreamService.DidReceiveEndOfTransmission && status === `Succeeded`) {
output += yield kubernetes_task_runner_1.default.runTask(this.kubeConfig, this.kubeClient, this.jobName, this.podName, 'main', this.namespace, true); output += yield kubernetes_task_runner_1.default.runTask(this.kubeConfig, this.kubeClient, this.jobName, this.podName, 'main', this.namespace, true);
break; break;
} }
if (follow_log_stream_service_1.FollowLogStreamService.DidReceiveEndOfTransmission) {
break;
}
} }
else { else {
cloud_runner_logger_1.default.log('Pod still running, recovering stream...'); cloud_runner_logger_1.default.log('Pod still running, recovering stream...');

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -163,9 +163,9 @@ class Kubernetes implements ProviderInterface {
const running = await KubernetesPods.IsPodRunning(this.podName, this.namespace, this.kubeClient); const running = await KubernetesPods.IsPodRunning(this.podName, this.namespace, this.kubeClient);
if (!running) { if (!running) {
const podStatus = await KubernetesPods.GetPodStatus(this.podName, this.namespace, this.kubeClient); status = await KubernetesPods.GetPodStatus(this.podName, this.namespace, this.kubeClient);
CloudRunnerLogger.log(`Pod not found, assumed ended!`); CloudRunnerLogger.log(`Pod not found, assumed ended!`);
if (FollowLogStreamService.DidReceiveEndOfTransmission && podStatus === `Succeeded`) { if (!FollowLogStreamService.DidReceiveEndOfTransmission && status === `Succeeded`) {
output += await KubernetesTaskRunner.runTask( output += await KubernetesTaskRunner.runTask(
this.kubeConfig, this.kubeConfig,
this.kubeClient, this.kubeClient,
@ -177,6 +177,10 @@ class Kubernetes implements ProviderInterface {
); );
break; break;
} }
if (FollowLogStreamService.DidReceiveEndOfTransmission) {
break;
}
} else { } else {
CloudRunnerLogger.log('Pod still running, recovering stream...'); CloudRunnerLogger.log('Pod still running, recovering stream...');
} }