@@ -117,7 +117,7 @@ func ReadLogs(appName string, podSearchLabels map[string]string, verbose bool, s
117117 }
118118
119119 if ! wrotePending {
120- if ! writeSocket ("\n Pending" , socket ) {
120+ if ! writeSocket ("\n Pending... " , socket ) {
121121 return
122122 }
123123 wrotePending = true
@@ -138,9 +138,10 @@ func getKubectlLogs(pods []kcore.Pod, verbose bool, wrotePending bool, previous
138138 }
139139
140140 if isAllPending {
141- if ! writeSocket ("\n Pending" , socket ) {
141+ if ! writeSocket ("\n Pending... " , socket ) {
142142 return
143143 }
144+ wrotePending = true
144145 }
145146 }
146147
@@ -154,7 +155,7 @@ func getKubectlLogs(pods []kcore.Pod, verbose bool, wrotePending bool, previous
154155 podCheckCancel := make (chan struct {})
155156 defer close (podCheckCancel )
156157
157- go podCheck (podCheckCancel , socket , pods , previous , verbose , inr )
158+ go podCheck (podCheckCancel , socket , pods , previous , verbose , wrotePending , inr )
158159 pumpStdin (socket , inw )
159160 podCheckCancel <- struct {}{}
160161}
@@ -186,7 +187,7 @@ func startKubectlProcess(pod kcore.Pod, previous bool, attrs *os.ProcAttr) (*os.
186187 return process , nil
187188}
188189
189- func podCheck (podCheckCancel chan struct {}, socket * websocket.Conn , initialPodList []kcore.Pod , previous bool , verbose bool , inr * os.File ) {
190+ func podCheck (podCheckCancel chan struct {}, socket * websocket.Conn , initialPodList []kcore.Pod , previous bool , verbose bool , wrotePending bool , inr * os.File ) {
190191 timer := time .NewTimer (0 )
191192 defer timer .Stop ()
192193
@@ -266,6 +267,13 @@ func podCheck(podCheckCancel chan struct{}, socket *websocket.Conn, initialPodLi
266267 maxPodsToAdd = len (podsToAdd )
267268 }
268269
270+ if wrotePending && len (latestRunningPods ) > 0 {
271+ if ! writeSocket ("Streaming logs:" , socket ) {
272+ return
273+ }
274+ wrotePending = false
275+ }
276+
269277 for _ , podName := range podsToAdd [:maxPodsToAdd ] {
270278 process , err := startKubectlProcess (latestRunningPodsMap [podName ], previous , & os.ProcAttr {
271279 Files : []* os.File {inr , outw , outw },
@@ -453,10 +461,6 @@ func extractFromCortexLog(match string, loglevel string, logStr string) (*string
453461 return formatHeader3 (cutStr ), false
454462 }
455463
456- if strings .HasPrefix (cutStr , "Serving model" ) {
457- return formatHeader3 (cutStr ), false
458- }
459-
460464 if strings .HasPrefix (cutStr , "Prediction failed" ) {
461465 return formatHeader2 (cutStr ), false
462466 }
0 commit comments