@@ -286,13 +286,13 @@ func (r *GitRepositoryReconciler) reconcile(ctx context.Context, obj *sourcev1.G
286
286
res = sreconcile .LowestRequeuingResult (res , recResult )
287
287
}
288
288
289
- r .notify (oldObj , obj , commit , res , resErr )
289
+ r .notify (ctx , oldObj , obj , commit , res , resErr )
290
290
291
291
return res , resErr
292
292
}
293
293
294
294
// notify emits notification related to the result of reconciliation.
295
- func (r * GitRepositoryReconciler ) notify (oldObj , newObj * sourcev1.GitRepository , commit git.Commit , res sreconcile.Result , resErr error ) {
295
+ func (r * GitRepositoryReconciler ) notify (ctx context. Context , oldObj , newObj * sourcev1.GitRepository , commit git.Commit , res sreconcile.Result , resErr error ) {
296
296
// Notify successful reconciliation for new artifact, no-op reconciliation
297
297
// and recovery from any failure.
298
298
if r .shouldNotify (oldObj , newObj , res , resErr ) {
@@ -319,10 +319,12 @@ func (r *GitRepositoryReconciler) notify(oldObj, newObj *sourcev1.GitRepository,
319
319
if oldChecksum != newObj .GetArtifact ().Checksum {
320
320
r .AnnotatedEventf (newObj , annotations , corev1 .EventTypeNormal ,
321
321
"NewArtifact" , message )
322
+ ctrl .LoggerFrom (ctx ).Info (message )
322
323
} else {
323
324
if sreconcile .FailureRecovery (oldObj , newObj , gitRepositoryFailConditions ) {
324
325
r .AnnotatedEventf (newObj , annotations , corev1 .EventTypeNormal ,
325
326
meta .SucceededReason , message )
327
+ ctrl .LoggerFrom (ctx ).Info (message )
326
328
}
327
329
}
328
330
}
0 commit comments