Skip to content

Commit 2c3cb00

Browse files
committed
PR feedback
1 parent bea818f commit 2c3cb00

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/model/cloud-runner/providers/k8s/kubernetes-pods.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class KubernetesPods {
3434

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

src/model/cloud-runner/workflows/custom-workflow.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@ export class CustomWorkflow {
4646
} catch (error: any) {
4747
const allowFailure = step.allowFailure === true;
4848
const stepName = step.name || step.image || 'unknown';
49-
49+
5050
if (allowFailure) {
5151
CloudRunnerLogger.logWarning(
52-
`Hook container "${stepName}" failed but allowFailure is true. Continuing build. Error: ${error?.message || error}`,
52+
`Hook container "${stepName}" failed but allowFailure is true. Continuing build. Error: ${
53+
error?.message || error
54+
}`,
5355
);
5456
// Continue to next step
5557
} else {

0 commit comments

Comments
 (0)