1
0
mirror of https://codeberg.org/crowci/crow.git synced 2025-08-07 20:23:03 +03:00

Fail on InvalidImageName (#4007)

This commit is contained in:
Thomas Anderson
2024-08-06 18:07:07 +03:00
committed by GitHub
parent 08b44b95c3
commit c5746ccb50
2 changed files with 15 additions and 3 deletions

View File

@@ -254,7 +254,7 @@ func (e *kube) WaitStep(ctx context.Context, step *types.Step, taskUUID string)
}
if pod.Name == podName {
if isImagePullBackOffState(pod) {
if isImagePullBackOffState(pod) || isInvalidImageName(pod) {
finished <- true
}
@@ -286,7 +286,7 @@ func (e *kube) WaitStep(ctx context.Context, step *types.Step, taskUUID string)
return nil, err
}
if isImagePullBackOffState(pod) {
if isImagePullBackOffState(pod) || isInvalidImageName(pod) {
return nil, fmt.Errorf("could not pull image for pod %s", podName)
}
@@ -330,7 +330,7 @@ func (e *kube) TailStep(ctx context.Context, step *types.Step, taskUUID string)
}
if pod.Name == podName {
if isImagePullBackOffState(pod) {
if isImagePullBackOffState(pod) || isInvalidImageName(pod) {
up <- true
}
switch pod.Status.Phase {