Skip to content

Commit af27abe

Browse files
Read logs also from failed child (container job/container action) pod (actions#135)
Co-authored-by: Katarzyna Radkowska <[email protected]>
1 parent 638bd19 commit af27abe

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

packages/k8s/src/hooks/run-container-step.ts

+9-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import {
1212
} from '../k8s'
1313
import {
1414
containerVolumes,
15-
PodPhase,
15+
fixArgs,
1616
mergeContainerWithOptions,
17-
readExtensionFromFile,
18-
fixArgs
17+
PodPhase,
18+
readExtensionFromFile
1919
} from '../k8s/utils'
2020
import { JOB_CONTAINER_EXTENSION_NAME, JOB_CONTAINER_NAME } from './constants'
2121

@@ -65,7 +65,12 @@ export async function runContainerStep(
6565

6666
await waitForPodPhases(
6767
podName,
68-
new Set([PodPhase.COMPLETED, PodPhase.RUNNING, PodPhase.SUCCEEDED]),
68+
new Set([
69+
PodPhase.COMPLETED,
70+
PodPhase.RUNNING,
71+
PodPhase.SUCCEEDED,
72+
PodPhase.FAILED
73+
]),
6974
new Set([PodPhase.PENDING, PodPhase.UNKNOWN])
7075
)
7176
core.debug('Container step is running or complete, pulling logs')

0 commit comments

Comments
 (0)