mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-02 23:36:35 +00:00
Enable golangci linter forcetypeassert (#3168)
Split out from https://github.com/woodpecker-ci/woodpecker/pull/2960
This commit is contained in:
@@ -216,7 +216,12 @@ func (e *kube) WaitStep(ctx context.Context, step *types.Step, taskUUID string)
|
||||
finished := make(chan bool)
|
||||
|
||||
podUpdated := func(old, new any) {
|
||||
pod := new.(*v1.Pod)
|
||||
pod, ok := new.(*v1.Pod)
|
||||
if !ok {
|
||||
log.Error().Msgf("could not parse pod: %v", new)
|
||||
return
|
||||
}
|
||||
|
||||
if pod.Name == podName {
|
||||
if isImagePullBackOffState(pod) {
|
||||
finished <- true
|
||||
@@ -276,7 +281,12 @@ func (e *kube) TailStep(ctx context.Context, step *types.Step, taskUUID string)
|
||||
up := make(chan bool)
|
||||
|
||||
podUpdated := func(old, new any) {
|
||||
pod := new.(*v1.Pod)
|
||||
pod, ok := new.(*v1.Pod)
|
||||
if !ok {
|
||||
log.Error().Msgf("could not parse pod: %v", new)
|
||||
return
|
||||
}
|
||||
|
||||
if pod.Name == podName {
|
||||
switch pod.Status.Phase {
|
||||
case v1.PodRunning, v1.PodSucceeded, v1.PodFailed:
|
||||
|
Reference in New Issue
Block a user