@@ -148,6 +148,9 @@ func (f *Function) RunFunction(ctx context.Context, req *fnv1beta1.RunFunctionRe
148148 // composed resource.
149149 existing := 0
150150
151+ // Increments this for each resource template that has been skipped
152+ skipped := 0
153+
151154 for _ , t := range cts {
152155 log := log .WithValues ("resource-template-name" , t .Name )
153156 log .Debug ("Processing resource template" )
@@ -258,6 +261,7 @@ func (f *Function) RunFunction(ctx context.Context, req *fnv1beta1.RunFunctionRe
258261 // Skip adding this resource to the desired state because it doesn't
259262 // exist yet, and a required FromFieldPath was not (yet) found.
260263 if skip {
264+ skipped ++
261265 continue
262266 }
263267
@@ -269,6 +273,10 @@ func (f *Function) RunFunction(ctx context.Context, req *fnv1beta1.RunFunctionRe
269273 return rsp , nil
270274 }
271275
276+ if skipped > 0 {
277+ rsp .GetDesired ().GetComposite ().Ready = fnv1beta1 .Ready_READY_FALSE
278+ }
279+
272280 if err := response .SetDesiredComposedResources (rsp , desired ); err != nil {
273281 response .Fatal (rsp , errors .Wrapf (err , "cannot set desired composed resources in %T" , rsp ))
274282 return rsp , nil
@@ -284,7 +292,9 @@ func (f *Function) RunFunction(ctx context.Context, req *fnv1beta1.RunFunctionRe
284292 log .Info ("Successfully processed patch-and-transform resources" ,
285293 "resource-templates" , len (input .Resources ),
286294 "existing-resources" , existing ,
287- "warnings" , warnings )
295+ "warnings" , warnings ,
296+ "skipped" , skipped ,
297+ )
288298
289299 return rsp , nil
290300}
0 commit comments