You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
response.Warning(rsp, errors.Wrapf(err, "not adding new composed resource %q to desired state because %q patch at index %d has 'policy.fromFieldPath: Required'", t.Name, p.GetType(), i))
222
+
223
+
// There's no point processing further patches.
224
+
// They'll either be from an observed composed
225
+
// resource that doesn't exist yet, or to a desired
226
+
// composed resource that we'll discard.
227
+
skip=true
228
+
break
229
+
}
230
+
response.Warning(rsp, errors.Wrapf(err, "cannot render composed resource %q %q patch at index %d: ignoring 'policy.fromFieldPath: Required' because 'to' resource already exists", t.Name, p.GetType(), i))
231
+
}
232
+
233
+
// If any optional field path isn't found we just skip this
234
+
// patch and move on. The path may be populated by a
235
+
// subsequent patch.
236
+
continue
237
+
}
238
+
response.Fatal(rsp, errors.Wrapf(err, "cannot render composed resource %q %q patch at index %d", t.Name, p.GetType(), i))
239
+
returnrsp, nil
240
+
}
200
241
}
201
242
202
-
ifstore {
203
-
// Add or replace our desired resource.
204
-
desired[resource.Name(t.Name)] =dcd
243
+
// Skip adding this resource to the desired state because it doesn't
244
+
// exist yet, and a required FromFieldPath was not (yet) found.
reason: "If we fail to patch a desired resource produced by a previous Function in the pipeline we should return a warning result, and leave the original desired resource untouched.",
387
+
"OptionalFieldPathNotFound": {
388
+
reason: "If we fail to patch a desired resource because an optional field path was not found we should skip the patch.",
reason: "If we fail to patch a desired resource because a required field path was not found, and the resource doesn't exist, we should not add it to desired state (i.e. create it).",
Message: fmt.Sprintf("cannot render patches for composed resource %q: cannot apply the %q patch at index 1: spec.doesNotExist: no such field", "cool-resource", "FromCompositeFieldPath"),
533
+
Message: `not adding new composed resource "new-resource" to desired state because "FromCompositeFieldPath" patch at index 0 has 'policy.fromFieldPath: Required': spec.doesNotExist: no such field`,
534
+
},
535
+
{
536
+
Severity: fnv1beta1.Severity_SEVERITY_WARNING,
537
+
Message: `cannot render composed resource "existing-resource" "FromCompositeFieldPath" patch at index 1: ignoring 'policy.fromFieldPath: Required' because 'to' resource already exists: spec.doesNotExist: no such field`,
538
+
},
539
+
},
540
+
},
541
+
},
542
+
},
543
+
"PatchErrorIsFatal": {
544
+
reason: "If we fail to patch a desired resource we should return a fatal result.",
0 commit comments