serverless/serverless-python-requirements

Plugin destroys deployments with provider.runtime other than python.

mklenbw opened this issue · 2 comments

Are you certain it's a bug?

  • Yes, it looks like a bug

Are you using the latest plugin release?

  • Yes, I'm using the latest plugin release

Is there an existing issue for this?

  • I have searched existing issues, it hasn't been reported yet

Issue description

If runtime in provider section is set to something not python (nodejs16.x) it will break the whole deployment.

Source:
index.js

40:  pythonBin:
41:     process.platform === 'win32'
42:       ? 'python.exe'
43:       : this.serverless.service.provider.runtime || 'python',

Service configuration (serverless.yml) content

N/A

Command name and used flags

serverless package

Command output

Error: spawn nodejs16.x ENOENT

Environment information

Environment: linux, node 16.13.0, framework 3.17.0, plugin 6.2.2, SDK 4.3.2

Hi @pgrzesik, I'm picking up where @mklenbw left off (thanks @mklenbw for reporting this issue and getting it started!).

To provide a bit more context, this issue is currently blocking the use of node 16 as a runtime (and probably node 14 as well) for Lambda, as it needs to be set in provider.runtime to be enabled.

I've created #773, which includes the work that @mklenbw did. The tests should be fixed now. Let me know once you've had a chance to run the tests. I ran prettify and lint locally, so hopefully there won't be any issues.

pkit commented

I can confirm that patching with #773 fixes this problem. (using runtime: node18.x)
God bless patch-package!