Skip to content

Commit

Permalink
SSE: kubernetes.go: fix return of empty job list in getJobsByIdentifi…
Browse files Browse the repository at this point in the history
…er() (#103)
  • Loading branch information
andmat900 authored Feb 5, 2025
1 parent 112fa58 commit 42af85d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ func (k *Kubernetes) getJobsByIdentifier(ctx context.Context, client *kubernetes
// Try different labels for backward compatibility:
// - etos.eiffel-community.github.io/id is v1alpha+
// - id is v0 legacy
var jobs *v1.JobList
for _, label := range []string{"etos.eiffel-community.github.io/id", "id"} {
jobs, err := client.BatchV1().Jobs(k.namespace).List(
ctx,
Expand All @@ -88,7 +87,7 @@ func (k *Kubernetes) getJobsByIdentifier(ctx context.Context, client *kubernetes
return jobs, nil
}
}
return jobs, nil
return &v1.JobList{}, nil
}

// IsFinished checks if an ESR job is finished.
Expand Down

0 comments on commit 42af85d

Please sign in to comment.