PR feedback
parent
f783857278
commit
ad9f2d31c3
|
|
@ -93,9 +93,9 @@ class KubernetesPods {
|
||||||
for (let i = 0; i < 6; i++) {
|
for (let i = 0; i < 6; i++) {
|
||||||
await new Promise((resolve) => setTimeout(resolve, 5000));
|
await new Promise((resolve) => setTimeout(resolve, 5000));
|
||||||
try {
|
try {
|
||||||
const updatedPod = (
|
const updatedPod = (await kubeClient.listNamespacedPod(namespace)).body.items.find(
|
||||||
await kubeClient.listNamespacedPod(namespace)
|
(x) => podName === x.metadata?.name,
|
||||||
).body.items.find((x) => podName === x.metadata?.name);
|
);
|
||||||
if (updatedPod?.status?.containerStatuses && updatedPod.status.containerStatuses.length > 0) {
|
if (updatedPod?.status?.containerStatuses && updatedPod.status.containerStatuses.length > 0) {
|
||||||
const updatedContainerStatus = updatedPod.status.containerStatuses[0];
|
const updatedContainerStatus = updatedPod.status.containerStatuses[0];
|
||||||
if (updatedContainerStatus.state?.terminated) {
|
if (updatedContainerStatus.state?.terminated) {
|
||||||
|
|
@ -109,9 +109,7 @@ class KubernetesPods {
|
||||||
CloudRunnerLogger.log(
|
CloudRunnerLogger.log(
|
||||||
`Pod ${podName} container failed with exit code ${updatedExitCode} after waiting.`,
|
`Pod ${podName} container failed with exit code ${updatedExitCode} after waiting.`,
|
||||||
);
|
);
|
||||||
errorDetails.push(
|
errorDetails.push(`Container terminated after wait: exit code ${updatedExitCode}`);
|
||||||
`Container terminated after wait: exit code ${updatedExitCode}`,
|
|
||||||
);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue