feat: add debug logs
This commit is contained in:
parent
1ff69e086f
commit
55dbe9f8c2
@ -17,10 +17,9 @@ func (crd Crd) manageFinalizer(jobEventObservable rxgo.Observable) {
|
||||
|
||||
finalizerName := "flink-operator.logicamp.tech/finalizer"
|
||||
for j := range jobEventObservable.Observe() {
|
||||
go func() {
|
||||
|
||||
jobEvent := j.V.(*FlinkJobCrdEvent)
|
||||
|
||||
pkg.Logger.Debug("[crd] [manage-finalizer] main loop", zap.String("name", jobEvent.Job.Name))
|
||||
go func() {
|
||||
if jobEvent.Job.GetDeletionTimestamp() != nil {
|
||||
// Resource is being deleted
|
||||
if controllerutil.ContainsFinalizer(jobEvent.Job, finalizerName) {
|
||||
|
||||
@ -41,12 +41,14 @@ func (crd Crd) watchFlinkJobs() rxgo.Observable {
|
||||
continue
|
||||
}
|
||||
|
||||
go func() {
|
||||
ch <- rxgo.Item{
|
||||
V: &FlinkJobCrdEvent{
|
||||
EventType: event.Type,
|
||||
Job: job,
|
||||
},
|
||||
}
|
||||
}()
|
||||
pkg.Logger.Debug("[crd] [watch] change in", zap.String("name", job.Name))
|
||||
switch event.Type {
|
||||
case watch.Bookmark:
|
||||
|
||||
@ -51,5 +51,5 @@ func (job *ManagedJob) Cycle() {
|
||||
// return
|
||||
// }
|
||||
|
||||
pkg.Logger.Warn("[managed-job] [cycle]", zap.String("unhanded job status", string(job.def.Status.JobStatus)))
|
||||
pkg.Logger.Warn("[managed-job] [cycle] unhanded job status", zap.String("name", job.def.Name), zap.String("status", string(job.def.Status.JobStatus)))
|
||||
}
|
||||
|
||||
@ -71,11 +71,10 @@ func (mgr *Manager) cycle(client *api.Client, crdInstance *crd.Crd) {
|
||||
},
|
||||
})
|
||||
}
|
||||
//pkg.Logger.Debug("[manager] [cycle] overviews", zap.Any("overviews", jobsOverviews))
|
||||
pkg.Logger.Debug("[manager] [cycle] overviews", zap.Any("overviews", jobManagerJobOverviews))
|
||||
|
||||
// Loop over job definitions as Kubernetes CRD
|
||||
for _, uid := range crd.GetAllJobKeys() {
|
||||
// pkg.Logger.Debug("mgr.processingJobsIds", zap.Any("processingJobIds", mgr.processingJobsIds))
|
||||
if lo.Contains(mgr.processingJobsIds, uid) {
|
||||
pkg.Logger.Warn("[manager] already in process", zap.Any("uid", uid))
|
||||
continue
|
||||
@ -97,6 +96,8 @@ func (mgr *Manager) cycle(client *api.Client, crdInstance *crd.Crd) {
|
||||
|
||||
}
|
||||
|
||||
pkg.Logger.Debug("[manager] [cycle] finding job", zap.Any("name", managedJob.def.Name))
|
||||
|
||||
jobManagerJobOverview, jobFound := lo.Find(jobManagerJobOverviews.Jobs, func(job api.JobOverview) bool {
|
||||
jobId := managedJob.GetJobId()
|
||||
if jobId != nil {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user