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
{{ message }}
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
Hey @yusukegoto 👋 Thanks for reporting. Could you provide a minimal reproducible example that I could try testing out on my side? It would be really helpful 🙇
Thanks again @yusukegoto. I managed to reproduce the issue and understand what is causing it. The issue stems from the fact that when you don't use package.individually: true, then the docker image is based on the provider runtime, which in this case is nodejs18.x. The fact that it works with nodejs20.x is actually surprising to me, I guess maybe that image includes Python with pip for some reason?
I'm honestly not sure about the resolution here. The options I see:
Detect such situation and error out, suggesting to upgrade to python runtime on provider level. It's not ideal as having other runtime as default sounds valid.
Detect such situation and error out, suggesting to use package.individually: true in such cases. The downside here is that we potentially have multiple functions that use the same Python runtime that we could package toghether, not individually. But also, we could have different Python runtimes specified, in which we case we should force individual packaging.
All of these solutions do not sound amazing to be fair, I'm leaning towards checking if all Python functions have the same runtime and if yes, then using that one and erroring out only in case of a mismatch. Of course that would only apply if provider-level runtime is non-python.
Activity
pgrzesik commentedon Mar 3, 2024
Hey @yusukegoto 👋 Thanks for reporting. Could you provide a minimal reproducible example that I could try testing out on my side? It would be really helpful 🙇
yusukegoto commentedon Mar 6, 2024
@pgrzesik
This is a link to my sample app.
https://github.com/yusukegoto/sls-python-poetry-example
And I found out this happens at least with nodejs18.x. If I update two
nodejs18.xin serverless.yml withnodejs20.x, package command succeeds 🤷♂️pgrzesik commentedon Mar 19, 2024
Thanks a lot @yusukegoto 🙇 I'll try to reproduce with your example and will report back 👍
pgrzesik commentedon Apr 7, 2024
Thanks again @yusukegoto. I managed to reproduce the issue and understand what is causing it. The issue stems from the fact that when you don't use
package.individually: true, then the docker image is based on the provider runtime, which in this case isnodejs18.x. The fact that it works withnodejs20.xis actually surprising to me, I guess maybe that image includes Python with pip for some reason?I'm honestly not sure about the resolution here. The options I see:
pythonruntime on provider level. It's not ideal as having other runtime as default sounds valid.package.individually: truein such cases. The downside here is that we potentially have multiple functions that use the same Python runtime that we could package toghether, not individually. But also, we could have different Python runtimes specified, in which we case we should force individual packaging.All of these solutions do not sound amazing to be fair, I'm leaning towards checking if all Python functions have the same runtime and if yes, then using that one and erroring out only in case of a mismatch. Of course that would only apply if provider-level runtime is non-python.
What do you think @yusukegoto ?