-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python functions shut down slowly #109
Comments
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? |
I'm afraid not, we took times when the image is already pulled. For instance the first time (fresh, so image being pulled) takes up to 26 seconds (for a regular Btw the issue is definitely on shutdown. With debug logs I can see the function does its job quickly, then takes around 9s to quit, so essentially preventing the output of the render command to be shown. |
Signed-off-by: Jesús Fernández <[email protected]>
I realized by chance that the problem comes on shutdown, regardless of the Crossplane version. What seems to be changed from >1.17.1 is the fact that the |
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
The text was updated successfully, but these errors were encountered: