PR feedback

cloud-runner-develop
Frostebite 2025-12-05 23:36:23 +00:00
parent bea818fb9c
commit 2c3cb006c0
2 changed files with 7 additions and 5 deletions

View File

@ -34,7 +34,7 @@ class KubernetesPods {
let containerExitCode: number | undefined;
let containerSucceeded = false;
if (containerStatuses.length > 0) {
containerStatuses.forEach((cs, idx) => {
if (cs.state?.waiting) {
@ -64,7 +64,7 @@ class KubernetesPods {
// Check if only PreStopHook failed but container succeeded
const hasPreStopHookFailure = events.some((e) => e.reason === 'FailedPreStopHook');
const wasKilled = events.some((e) => e.reason === 'Killing');
// If container succeeded (exit code 0), PreStopHook failure is non-critical
// Also check if pod was killed but container might have succeeded
if (containerSucceeded && containerExitCode === 0) {
@ -82,7 +82,7 @@ class KubernetesPods {
// Don't throw error - container succeeded, PreStopHook failure is non-critical
return false; // Pod is not running, but we don't treat it as a failure
}
// If pod was killed and we have PreStopHook failure but no container status yet, wait a bit
// The container might have succeeded but status hasn't been updated yet
if (wasKilled && hasPreStopHookFailure && containerExitCode === undefined) {

View File

@ -46,10 +46,12 @@ export class CustomWorkflow {
} catch (error: any) {
const allowFailure = step.allowFailure === true;
const stepName = step.name || step.image || 'unknown';
if (allowFailure) {
CloudRunnerLogger.logWarning(
`Hook container "${stepName}" failed but allowFailure is true. Continuing build. Error: ${error?.message || error}`,
`Hook container "${stepName}" failed but allowFailure is true. Continuing build. Error: ${
error?.message || error
}`,
);
// Continue to next step
} else {