mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-02-03 23:49:08 +08:00
pr feedback
This commit is contained in:
@@ -142,6 +142,18 @@ class KubernetesPods {
|
||||
return false; // PreStopHook failure alone is not fatal if container status is unclear
|
||||
}
|
||||
|
||||
// Exit code 137 (128 + 9) means SIGKILL - container was killed by system (often OOM)
|
||||
// If this happened with PreStopHook failure, it might be a resource issue, not a real failure
|
||||
// Be lenient if we only have PreStopHook/ExceededGracePeriod issues
|
||||
if (containerExitCode === 137 && (hasPreStopHookFailure || hasExceededGracePeriod)) {
|
||||
CloudRunnerLogger.logWarning(
|
||||
`Pod ${podName} was killed (exit code 137 - likely OOM or resource limit) with PreStopHook/grace period issues. This may be a resource constraint issue rather than a build failure.`,
|
||||
);
|
||||
// Still log the details but don't fail the test - the build might have succeeded before being killed
|
||||
CloudRunnerLogger.log(`Pod details: ${errorDetails.join('\n')}`);
|
||||
return false; // Don't treat system kills as test failures if only PreStopHook issues
|
||||
}
|
||||
|
||||
const errorMessage = `K8s pod failed\n${errorDetails.join('\n')}`;
|
||||
CloudRunnerLogger.log(errorMessage);
|
||||
throw new Error(errorMessage);
|
||||
|
||||
Reference in New Issue
Block a user