Skip to content

Commit 5762eee

Browse files
authored
[jobframework] Fix logging of error message (#1944)
1 parent 34dc915 commit 5762eee

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

‎.golangci.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ linters:
2929
- gocritic
3030
- goimports
3131
- govet
32+
- loggercheck
3233
- misspell
3334
- unconvert
3435

‎pkg/controller/jobframework/reconciler.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ func (r *JobReconciler) ReconcileGenericJob(ctx context.Context, req ctrl.Reques
402402
// Mark the workload as finished with failure since the is no point to retry.
403403
errUpdateStatus := workload.UpdateStatus(ctx, r.client, wl, kueue.WorkloadFinished, metav1.ConditionTrue, FailedToStartFinishedReason, err.Error(), constants.JobControllerName)
404404
if errUpdateStatus != nil {
405-
log.Error(errUpdateStatus, "Updating workload status, on start failure %s", err.Error())
405+
log.Error(errUpdateStatus, "Updating workload status, on start failure", "err", err)
406406
}
407407
return ctrl.Result{}, errUpdateStatus
408408
}

0 commit comments

Comments
 (0)