Open fernandezcuesta opened 1 week ago
Update: I verified that this doesn't happen with Crossplane <= v1.17.1, so both v1.17.2 and 1.18.0 are affected
I can't imagine why the version of Crossplane would affect function startup/shutdown time. Given it's Python I wouldn't ever expect it to be as fast as a Go function, but 10s startup does seem like a lot.
Are your tests factoring in image pull time? xpkg.upbound.io/negz/function-auto-python:v0.1.0
and xpkg.upbound.io/crossplane-contrib/function-auto-ready:v0.3.0
do the same thing, but the Python function is roughly twice as large. They both use Distroless image bases, so I'm guessing the extra size is the Python interpreter and stdlib etc.
What happened?
I'm not fully sure where to report this, but the point is that after introducing a composition function developed with python, we noticed that:
crossplane render
got penalized as well.This is negatively impacting both CI and DevEx since rendering a composition is quite a common use case.
How can we reproduce it?
I just tested this with a dummy function which does nothing:
Running
crossplane render
on a composition that has this function as a dependency (not necessarily used in the pipeline, just declaring this as a dependency incrossplane.yaml
is enough) adds an extra ~10s. A couple of experiments with simple compositions raise the amount of time for the render command from 1-2 seconds to 10-12 seconds.I was suspecting that this could have something to do, and played by setting it to
None
but apparently didn't help :(What environment did it happen in?
function-sdk-python version: 0.5.0 crank version v1.18.0