Skip to content
Latchkey

Crossplane "crossplane beta render" error in CI

crossplane beta render runs your composition through its function pipeline locally and prints the resources it would create. It fails when a required argument is missing, a function image cannot run, or the composition and XR do not line up.

What this error means

A PR step running crossplane beta render xr.yaml composition.yaml functions.yaml errors instead of printing rendered resources, often naming a function or a file it could not load.

crossplane
crossplane: error: cannot render composite resource: cannot run function pipeline:
cannot run function "function-patch-and-transform": cannot get function:
Function.pkg.crossplane.io "function-patch-and-transform" not found

Common causes

The functions file does not declare a used function

The composition references a function that is not present in the functions.yaml passed to render, so the pipeline cannot run it.

A missing file or malformed input argument

The XR, composition, or functions path is wrong, or the XR does not match the composition it is rendered against.

How to fix it

Pass every referenced function to render

  1. List the functions your composition pipeline references.
  2. Declare each one in a functions.yaml with its runtime annotation.
  3. Pass XR, composition, and functions to render.
Terminal
crossplane beta render xr.yaml composition.yaml functions.yaml

Declare the function with a Development runtime

For local render, point the function to a running Development endpoint or its package so the CLI can invoke it.

functions.yaml
apiVersion: pkg.crossplane.io/v1beta1
kind: Function
metadata:
  name: function-patch-and-transform
spec:
  package: xpkg.upbound.io/crossplane-contrib/function-patch-and-transform:v0.7.0

How to prevent it

  • Render compositions in PR before applying them to a cluster.
  • Keep a functions.yaml that lists every function the pipeline uses.
  • Commit example XRs so render has a real input to work from.

Frequently asked questions

What causes ""crossplane beta render" fails"?
The composition references a function that is not present in the functions.yaml passed to render, so the pipeline cannot run it.
How do I fix "crossplane beta render" fails?
Pass every referenced function to render

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card