@@ -65,11 +65,10 @@ func (s *PlanNeeded) getHandler() Handler {
65
65
if isActionBlocked (r , layer , repository , syncwindow .PlanAction ) {
66
66
return ctrl.Result {RequeueAfter : r .Config .Controller .Timers .WaitAction }, nil
67
67
}
68
- // TODO: use relevant commit instead of last commit when repo controller will set it
69
- revision , ok := layer .Annotations [annotations .LastBranchCommit ]
68
+ revision , ok := layer .Annotations [annotations .LastRelevantCommit ]
70
69
if ! ok {
71
- r .Recorder .Event (layer , corev1 .EventTypeWarning , "Reconciliation" , "Layer has no last branch commit annotation, Plan run not created" )
72
- log .Errorf ("layer %s has no last branch commit annotation, run not created" , layer .Name )
70
+ r .Recorder .Event (layer , corev1 .EventTypeWarning , "Reconciliation" , "Layer has no last relevant commit annotation, Plan run not created" )
71
+ log .Errorf ("layer %s has no last relevant commit annotation, run not created" , layer .Name )
73
72
return ctrl.Result {RequeueAfter : r .Config .Controller .Timers .OnError }, nil
74
73
}
75
74
run := r .getRun (layer , revision , PlanAction )
@@ -98,11 +97,10 @@ func (s *ApplyNeeded) getHandler() Handler {
98
97
if isActionBlocked (r , layer , repository , syncwindow .ApplyAction ) {
99
98
return ctrl.Result {RequeueAfter : r .Config .Controller .Timers .WaitAction }, nil
100
99
}
101
- // TODO: use relevant commit instead of last commit when repo controller will set it
102
- revision , ok := layer .Annotations [annotations .LastBranchCommit ]
100
+ revision , ok := layer .Annotations [annotations .LastRelevantCommit ]
103
101
if ! ok {
104
- r .Recorder .Event (layer , corev1 .EventTypeWarning , "Reconciliation" , "Layer has no last branch commit annotation, Apply run not created" )
105
- log .Errorf ("layer %s has no last branch commit annotation, run not created" , layer .Name )
102
+ r .Recorder .Event (layer , corev1 .EventTypeWarning , "Reconciliation" , "Layer has no last relevant commit annotation, Apply run not created" )
103
+ log .Errorf ("layer %s has no last relevant commit annotation, run not created" , layer .Name )
106
104
return ctrl.Result {RequeueAfter : r .Config .Controller .Timers .OnError }, nil
107
105
}
108
106
run := r .getRun (layer , revision , ApplyAction )
0 commit comments