Skip to content

Commit da0f887

Browse files
committed
add logging
1 parent e2a6e93 commit da0f887

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pkg/controller/flink/client/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ func (c *FlinkJobManagerClient) ForceCancelJob(ctx context.Context, url string,
225225
logger.Errorf(ctx, fmt.Sprintf("Force cancel job failed with response %v", response))
226226
return GetRetryableError(err, v1beta1.ForceCancelJob, response.Status(), DefaultRetries)
227227
}
228-
228+
logger.Info(ctx, "Successfully cancelled the job")
229229
c.metrics.forceCancelJobSuccessCounter.Inc(ctx)
230230
return nil
231231
}

pkg/controller/flinkapplication/flink_state_machine.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -984,6 +984,7 @@ func (s *FlinkStateMachine) handleApplicationDeleting(ctx context.Context, app *
984984
}
985985
job, err := s.flinkController.GetJobForApplication(ctx, app, app.Status.DeployHash)
986986
if err != nil {
987+
logger.Warn(ctx, "Error: "+err.Error(), err)
987988
return statusUnchanged, err
988989
}
989990

@@ -995,6 +996,7 @@ func (s *FlinkStateMachine) handleApplicationDeleting(ctx context.Context, app *
995996
case v1beta1.DeleteModeForceCancel:
996997
if job.State == client.Cancelling {
997998
// we've already cancelled the job, waiting for it to finish
999+
logger.Info(ctx, "Still in cancelling..")
9981000
return statusUnchanged, nil
9991001
} else if jobFinished(job) {
10001002
// job was successfully cancelled

0 commit comments

Comments
 (0)