PR feedback
parent
adcdf1b77a
commit
beee035be3
|
|
@ -23,16 +23,28 @@ class KubernetesPods {
|
||||||
errorDetails.push(`Phase: ${phase}`);
|
errorDetails.push(`Phase: ${phase}`);
|
||||||
|
|
||||||
if (conditions.length > 0) {
|
if (conditions.length > 0) {
|
||||||
errorDetails.push(`Conditions: ${JSON.stringify(conditions.map(c => ({ type: c.type, status: c.status, reason: c.reason, message: c.message })), undefined, 2)}`);
|
errorDetails.push(
|
||||||
|
`Conditions: ${JSON.stringify(
|
||||||
|
conditions.map((c) => ({ type: c.type, status: c.status, reason: c.reason, message: c.message })),
|
||||||
|
undefined,
|
||||||
|
2,
|
||||||
|
)}`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (containerStatuses.length > 0) {
|
if (containerStatuses.length > 0) {
|
||||||
containerStatuses.forEach((cs, idx) => {
|
containerStatuses.forEach((cs, idx) => {
|
||||||
if (cs.state?.waiting) {
|
if (cs.state?.waiting) {
|
||||||
errorDetails.push(`Container ${idx} (${cs.name}) waiting: ${cs.state.waiting.reason} - ${cs.state.waiting.message || ''}`);
|
errorDetails.push(
|
||||||
|
`Container ${idx} (${cs.name}) waiting: ${cs.state.waiting.reason} - ${cs.state.waiting.message || ''}`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (cs.state?.terminated) {
|
if (cs.state?.terminated) {
|
||||||
errorDetails.push(`Container ${idx} (${cs.name}) terminated: ${cs.state.terminated.reason} - ${cs.state.terminated.message || ''} (exit code: ${cs.state.terminated.exitCode})`);
|
errorDetails.push(
|
||||||
|
`Container ${idx} (${cs.name}) terminated: ${cs.state.terminated.reason} - ${
|
||||||
|
cs.state.terminated.message || ''
|
||||||
|
} (exit code: ${cs.state.terminated.exitCode})`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,9 @@ describe('Cloud Runner Retain Workspace', () => {
|
||||||
);
|
);
|
||||||
try {
|
try {
|
||||||
await CloudRunnerSystem.Run(
|
await CloudRunnerSystem.Run(
|
||||||
`rm -rf ./cloud-runner-cache/${path.basename(CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute)} || true`,
|
`rm -rf ./cloud-runner-cache/${path.basename(
|
||||||
|
CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute,
|
||||||
|
)} || true`,
|
||||||
);
|
);
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
CloudRunnerLogger.log(`Failed to cleanup workspace: ${error.message}`);
|
CloudRunnerLogger.log(`Failed to cleanup workspace: ${error.message}`);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue