@@ -484,8 +484,8 @@ func (c *FrameworkController) syncFramework(key string) (returnedErr error) {
484
484
defer func () {
485
485
if returnedErr != nil {
486
486
// returnedErr is already prefixed with logPfx
487
- klog .Warningf (returnedErr .Error ())
488
- klog .Warningf (logPfx +
487
+ klog .Warning (returnedErr .Error ())
488
+ klog .Warning (logPfx +
489
489
"Failed to due to Platform Transient Error. " +
490
490
"Will enqueue it again after rate limited delay" )
491
491
}
@@ -715,9 +715,9 @@ func (c *FrameworkController) syncFrameworkState(f *ci.Framework) (err error) {
715
715
// Ensure the FrameworkSnapshot is exposed before the deletion.
716
716
logSfx = ci .GetFrameworkSnapshotLogTail (f )
717
717
}
718
- klog .Infof (logPfx + "Framework will be deleted due to " +
719
- "FrameworkCompletedRetainSec %v is expired" + logSfx ,
720
- common .SecToDuration (c .cConfig .FrameworkCompletedRetainSec ))
718
+ klog .Info (logPfx + fmt . Sprintf ( "Framework will be deleted due to " +
719
+ "FrameworkCompletedRetainSec %v is expired" ,
720
+ common .SecToDuration (c .cConfig .FrameworkCompletedRetainSec )) + logSfx )
721
721
return c .deleteFramework (f , true )
722
722
}
723
723
@@ -739,7 +739,7 @@ func (c *FrameworkController) syncFrameworkState(f *ci.Framework) (err error) {
739
739
if f .Spec .ExecutionType == ci .ExecutionStop {
740
740
diag = fmt .Sprintf ("User has requested to stop the Framework" )
741
741
code = ci .CompletionCodeStopFrameworkRequested
742
- klog .Infof (logPfx + diag )
742
+ klog .Info (logPfx + diag )
743
743
} else {
744
744
if c .enqueueFrameworkAttemptCreationTimeoutCheck (f , true ) {
745
745
klog .Infof (logPfx +
@@ -752,7 +752,7 @@ func (c *FrameworkController) syncFrameworkState(f *ci.Framework) (err error) {
752
752
"so consider it was deleted and explicitly delete it" ,
753
753
common .SecToDuration (c .cConfig .ObjectLocalCacheCreationTimeoutSec ))
754
754
code = ci .CompletionCodeConfigMapCreationTimeout
755
- klog .Warningf (logPfx + diag )
755
+ klog .Warning (logPfx + diag )
756
756
}
757
757
758
758
// Ensure cm is deleted in remote to avoid managed cm leak after
@@ -770,7 +770,7 @@ func (c *FrameworkController) syncFrameworkState(f *ci.Framework) (err error) {
770
770
if f .Status .State != ci .FrameworkAttemptCreationPending {
771
771
if f .Status .AttemptStatus .CompletionStatus == nil {
772
772
diag := fmt .Sprintf ("ConfigMap was deleted by others" )
773
- klog .Warningf (logPfx + diag )
773
+ klog .Warning (logPfx + diag )
774
774
c .completeFrameworkAttempt (f , true ,
775
775
ci .CompletionCodeConfigMapExternalDeleted .
776
776
NewFrameworkAttemptCompletionStatus (diag , nil ))
@@ -812,7 +812,7 @@ func (c *FrameworkController) syncFrameworkState(f *ci.Framework) (err error) {
812
812
} else {
813
813
if f .Status .AttemptStatus .CompletionStatus == nil {
814
814
diag := fmt .Sprintf ("ConfigMap is being deleted by others" )
815
- klog .Warningf (logPfx + diag )
815
+ klog .Warning (logPfx + diag )
816
816
f .Status .AttemptStatus .CompletionStatus =
817
817
ci .CompletionCodeConfigMapExternalDeleted .
818
818
NewFrameworkAttemptCompletionStatus (diag , nil )
@@ -881,7 +881,7 @@ func (c *FrameworkController) syncFrameworkState(f *ci.Framework) (err error) {
881
881
// also expose it as one history snapshot.
882
882
logSfx = ci .GetFrameworkSnapshotLogTail (f )
883
883
}
884
- klog .Infof (logPfx + "Framework will be retried" + logSfx )
884
+ klog .Info (logPfx + "Framework will be retried" + logSfx )
885
885
886
886
f .Status .RetryPolicyStatus .TotalRetriedCount ++
887
887
if retryDecision .IsAccountable {
@@ -907,7 +907,7 @@ func (c *FrameworkController) syncFrameworkState(f *ci.Framework) (err error) {
907
907
908
908
if f .Spec .ExecutionType == ci .ExecutionStop {
909
909
diag := fmt .Sprintf ("User has requested to stop the Framework" )
910
- klog .Infof (logPfx + diag )
910
+ klog .Info (logPfx + diag )
911
911
912
912
// Ensure cm is deleted in remote to avoid managed cm leak after
913
913
// FrameworkAttemptCompleted.
@@ -955,7 +955,7 @@ func (c *FrameworkController) syncFrameworkState(f *ci.Framework) (err error) {
955
955
if ! f .IsCompleting () {
956
956
if f .Spec .ExecutionType == ci .ExecutionStop {
957
957
diag := fmt .Sprintf ("User has requested to stop the Framework" )
958
- klog .Infof (logPfx + diag )
958
+ klog .Info (logPfx + diag )
959
959
c .completeFrameworkAttempt (f , false ,
960
960
ci .CompletionCodeStopFrameworkRequested .
961
961
NewFrameworkAttemptCompletionStatus (diag , nil ))
@@ -1220,7 +1220,7 @@ func (c *FrameworkController) syncTaskState(
1220
1220
"Pod does not appear in the local cache within timeout %v, " +
1221
1221
"so consider it was deleted and explicitly delete it" ,
1222
1222
common .SecToDuration (c .cConfig .ObjectLocalCacheCreationTimeoutSec ))
1223
- klog .Warningf (logPfx + diag )
1223
+ klog .Warning (logPfx + diag )
1224
1224
1225
1225
// Ensure pod is deleted in remote to avoid managed pod leak after
1226
1226
// TaskAttemptCompleted.
@@ -1238,7 +1238,7 @@ func (c *FrameworkController) syncTaskState(
1238
1238
if taskStatus .State != ci .TaskAttemptCreationPending {
1239
1239
if taskStatus .AttemptStatus .CompletionStatus == nil {
1240
1240
diag := fmt .Sprintf ("Pod was deleted by others" )
1241
- klog .Warningf (logPfx + diag )
1241
+ klog .Warning (logPfx + diag )
1242
1242
c .completeTaskAttempt (f , taskRoleName , taskIndex , true ,
1243
1243
ci .CompletionCodePodExternalDeleted .
1244
1244
NewTaskAttemptCompletionStatus (diag , nil ))
@@ -1304,15 +1304,15 @@ func (c *FrameworkController) syncTaskState(
1304
1304
return nil
1305
1305
} else if pod .Status .Phase == core .PodSucceeded {
1306
1306
diag := fmt .Sprintf ("Pod succeeded" )
1307
- klog .Infof (logPfx + diag )
1307
+ klog .Info (logPfx + diag )
1308
1308
c .completeTaskAttempt (f , taskRoleName , taskIndex , false ,
1309
1309
ci .CompletionCodeSucceeded .NewTaskAttemptCompletionStatus (
1310
1310
diag , ci .ExtractPodCompletionStatus (pod )))
1311
1311
return nil
1312
1312
} else if pod .Status .Phase == core .PodFailed {
1313
1313
result := ci .MatchCompletionCodeInfos (pod )
1314
1314
diag := fmt .Sprintf ("Pod failed: %v" , result .Diagnostics )
1315
- klog .Infof (logPfx + diag )
1315
+ klog .Info (logPfx + diag )
1316
1316
c .completeTaskAttempt (f , taskRoleName , taskIndex , false ,
1317
1317
& ci.TaskAttemptCompletionStatus {
1318
1318
CompletionStatus : & ci.CompletionStatus {
@@ -1332,7 +1332,7 @@ func (c *FrameworkController) syncTaskState(
1332
1332
} else {
1333
1333
if taskStatus .AttemptStatus .CompletionStatus == nil {
1334
1334
diag := fmt .Sprintf ("Pod is being deleted by others" )
1335
- klog .Warningf (logPfx + diag )
1335
+ klog .Warning (logPfx + diag )
1336
1336
taskStatus .AttemptStatus .CompletionStatus =
1337
1337
ci .CompletionCodePodExternalDeleted .
1338
1338
NewTaskAttemptCompletionStatus (diag , nil )
@@ -1387,7 +1387,7 @@ func (c *FrameworkController) syncTaskState(
1387
1387
// expose it as one history snapshot.
1388
1388
logSfx = ci .GetFrameworkSnapshotLogTail (f )
1389
1389
}
1390
- klog .Infof (logPfx + "Task will be retried" + logSfx )
1390
+ klog .Info (logPfx + "Task will be retried" + logSfx )
1391
1391
1392
1392
taskStatus .RetryPolicyStatus .TotalRetriedCount ++
1393
1393
if retryDecision .IsAccountable {
@@ -1416,7 +1416,7 @@ func (c *FrameworkController) syncTaskState(
1416
1416
if apiErrors .IsInvalid (apiErr ) {
1417
1417
// Should be Framework Error instead of Platform Transient Error.
1418
1418
diag := fmt .Sprintf ("%v" , apiErr )
1419
- klog .Infof (logPfx + diag )
1419
+ klog .Info (logPfx + diag )
1420
1420
1421
1421
// Ensure pod is deleted in remote to avoid managed pod leak after
1422
1422
// TaskAttemptCompleted.
@@ -1471,7 +1471,7 @@ func (c *FrameworkController) syncTaskState(
1471
1471
msg := fmt .Sprintf (
1472
1472
"FailedTaskCount %v has reached MinFailedTaskCount %v in the TaskRole" ,
1473
1473
failedTaskCount , minFailedTaskCount )
1474
- klog .Infof (logPfx + msg )
1474
+ klog .Info (logPfx + msg )
1475
1475
c .completeFrameworkAttempt (f , false ,
1476
1476
& ci.FrameworkAttemptCompletionStatus {
1477
1477
CompletionStatus : taskStatus .AttemptStatus .CompletionStatus .CompletionStatus ,
@@ -1492,7 +1492,7 @@ func (c *FrameworkController) syncTaskState(
1492
1492
msg := fmt .Sprintf (
1493
1493
"SucceededTaskCount %v has reached MinSucceededTaskCount %v in the TaskRole" ,
1494
1494
succeededTaskCount , minSucceededTaskCount )
1495
- klog .Infof (logPfx + msg )
1495
+ klog .Info (logPfx + msg )
1496
1496
c .completeFrameworkAttempt (f , false ,
1497
1497
ci .CompletionCodeSucceeded .NewFrameworkAttemptCompletionStatus (
1498
1498
taskStatus .AttemptStatus .CompletionStatus .Diagnostics ,
@@ -1515,7 +1515,7 @@ func (c *FrameworkController) syncTaskState(
1515
1515
"FrameworkAttemptCompletionPolicy have ever been triggered: " +
1516
1516
"TotalTaskCount: %v, FailedTaskCount: %v" ,
1517
1517
totalTaskCount , failedTaskCount )
1518
- klog .Infof (logPfx + msg )
1518
+ klog .Info (logPfx + msg )
1519
1519
c .completeFrameworkAttempt (f , false ,
1520
1520
ci .CompletionCodeSucceeded .NewFrameworkAttemptCompletionStatus (
1521
1521
taskStatus .AttemptStatus .CompletionStatus .Diagnostics ,
0 commit comments