Skip to content

Commit 6d04106

Browse files
authored
Merge pull request #1907 from FabianKramm/master
refactor: reorder DevSpace warnings
2 parents a5d10fa + bdeaa4c commit 6d04106

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pkg/devspace/services/targetselector/until_newest_running.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ func (u *PodInfoPrinter) PrintPodInfo(client kubectl.Client, pod *v1.Pod, log lo
114114
}
115115

116116
status := kubectl.GetPodStatus(pod)
117-
log.Infof("DevSpace is waiting, because Pod %s has status: %s", pod.Name, status)
118117
u.shownEvents = displayWarnings(relevantObjectsFromPod(pod), pod.Namespace, client, u.shownEvents, log)
118+
log.Infof("DevSpace is waiting, because Pod %s has status: %s", pod.Name, status)
119119
u.lastWarning = time.Now()
120120
}
121121
}
@@ -125,8 +125,6 @@ func (u *PodInfoPrinter) PrintNotFoundWarning(client kubectl.Client, namespace s
125125
defer u.lastMutex.Unlock()
126126

127127
if time.Since(u.lastWarning) > time.Second*10 {
128-
log.Warnf("DevSpace still couldn't find any Pods that match the selector. DevSpace will continue waiting, but this operation might timeout")
129-
130128
u.shownEvents = displayWarnings([]relevantObject{
131129
{
132130
Kind: "StatefulSet",
@@ -137,7 +135,11 @@ func (u *PodInfoPrinter) PrintNotFoundWarning(client kubectl.Client, namespace s
137135
{
138136
Kind: "ReplicaSet",
139137
},
138+
{
139+
Kind: "Pod",
140+
},
140141
}, namespace, client, u.shownEvents, log)
142+
log.Warnf("DevSpace still couldn't find any Pods that match the selector. DevSpace will continue waiting, but this operation might timeout")
141143
u.lastWarning = time.Now()
142144
}
143145
}

0 commit comments

Comments
 (0)