@@ -46,10 +46,7 @@ func (f *Function) RunFunction(_ context.Context, req *fnv1.RunFunctionRequest)
4646
4747 // Check if changes need approval
4848 if f .needsApproval (approved , oldHash , newHash ) {
49- err := f .handleUnapprovedChanges (req , in , rsp , oldHash , newHash )
50- if err != nil {
51- return rsp , nil //nolint:nilerr // errors are handled in rsp
52- }
49+ f .handleUnapprovedChanges (req , in , rsp , oldHash , newHash )
5350 return rsp , nil
5451 }
5552
@@ -115,7 +112,7 @@ func (f *Function) needsApproval(approved bool, oldHash, newHash string) bool {
115112}
116113
117114// handleUnapprovedChanges processes the case where changes need approval
118- func (f * Function ) handleUnapprovedChanges (req * fnv1.RunFunctionRequest , in * v1beta1.Input , rsp * fnv1.RunFunctionResponse , oldHash , newHash string ) error {
115+ func (f * Function ) handleUnapprovedChanges (_ * fnv1.RunFunctionRequest , in * v1beta1.Input , rsp * fnv1.RunFunctionResponse , oldHash , newHash string ) {
119116 // Set condition to show approval is needed
120117 msg := "Changes detected. Approval required."
121118 if in .ApprovalMessage != nil {
@@ -139,8 +136,6 @@ func (f *Function) handleUnapprovedChanges(req *fnv1.RunFunctionRequest, in *v1b
139136 // This stops the composition process entirely until approval is granted
140137 f .log .Info ("Halting pipeline until changes are approved" , "message" , msg )
141138 response .Fatal (rsp , errors .New (detailedMsg ))
142-
143- return nil
144139}
145140
146141// handleApprovedChanges processes the case where changes are approved
@@ -606,5 +601,3 @@ func (f *Function) checkApprovalStatus(req *fnv1.RunFunctionRequest, in *v1beta1
606601
607602 return boolValue , nil
608603}
609-
610-
0 commit comments