Skip to content

Commit 94090b6

Browse files
vaibhavtiwari33adarsh0728vigith
authored
chore(cherry-pick): downgrade health check error log to warn (#3108) (#3387)
Signed-off-by: adarsh0728 <gooneriitk@gmail.com> Signed-off-by: Vigith Maurice <vigith@gmail.com> Signed-off-by: Vaibhav Tiwari <vaibhav.tiwari33@gmail.com> Co-authored-by: Adarsh Jain <gooneriitk@gmail.com> Co-authored-by: Vigith Maurice <vigith@gmail.com>
1 parent 02cfc57 commit 94090b6

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

pkg/mvtxdaemon/server/service/health_status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func (hc *HealthChecker) getDesiredReplica(mvtxMetrics *mvtxdaemon.MonoVertexMet
158158
// Extract the processing rate from the metrics for the default lookback period
159159
rate, existing := mvtxMetrics.ProcessingRates["default"]
160160
// Rate not available
161-
// send back error that we calculate the health status right now
161+
// send back error that we cannot calculate the health status right now
162162
if !existing || rate.GetValue() < 0 {
163163
return 0, fmt.Errorf("cannot check data health, MonoVertex %s has no rate information", mvtxMetrics.MonoVertex)
164164
} else {

pkg/mvtxdaemon/server/service/mvtx_service.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,11 @@ func (mvs *MonoVertexService) startHealthCheck(ctx context.Context) {
154154
criticality, err := mvs.healthChecker.getMonoVertexDataCriticality(ctx, mvtxMetrics.Metrics)
155155
logger.Debugw("MonoVertex Health check", zap.Any("criticality", criticality))
156156
if err != nil {
157+
// Warn level is used to avoid flooding the logs with errors
158+
// in case there are 0 pods running.
159+
logger.Warnw("Failed to check MonoVertex data criticality, perhaps there are no running pods!", zap.Error(err))
157160
// If there is an error, set the current health status to unknown.
158-
// as we are not able to determine the health of the pipeline.
159-
logger.Errorw("Failed to MonoVertex data criticality", zap.Error(err))
161+
// as we are not able to determine the health of the MonoVertex.
160162
mvs.healthChecker.setCurrentHealth(defaultDataHealthResponse)
161163
} else {
162164
// convert the MonoVertex health state to API response

test/fixtures/util.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,6 @@ func WaitForVertexPodRunning(kubeClient kubernetes.Interface, vertexClient flowp
345345
}
346346
ok = ok && len(podList.Items) > 0 && len(podList.Items) == vertexList.Items[0].CalculateReplicas() // pod number should equal to desired replicas
347347
for _, p := range podList.Items {
348-
log.Println("Checking for vertex pod ready: ", p.Name)
349348
ok = ok && isPodReady(p)
350349
}
351350
if ok {

0 commit comments

Comments
 (0)