serverless / serverless-kubeless

This plugin enables support for Kubeless within the Serverless Framework.
Apache License 2.0
303 stars 80 forks source link

Redeploying only hello function fails with an error #201

Open cscetbon opened 4 years ago

cscetbon commented 4 years ago

I'm testing that plugin and I have issues just following the tutorial. The first issue I met is regarding deploying to a namespace different from default https://github.com/serverless/serverless-kubeless/issues/188#issuecomment-605328537.

The other issue I have is redeploying the function hello only. When I try I get the following

serverless deploy function -f hello
Serverless: Packaging function: hello...
Serverless: Excluding development dependencies...
Serverless: Redeploying hello...

  Type Error ---------------------------------------------

  TypeError: Cannot read property 'artifact' of undefined
      at KubelessDeployFunction.getPkg (/Users/cscetbon/src/git/serverless-kubeless/examples/get-python/node_modules/serverless-kubeless/deploy/kubelessDeploy.js:85:37)
      at /Users/cscetbon/src/git/serverless-kubeless/examples/get-python/node_modules/serverless-kubeless/deploy/kubelessDeploy.js:111:28
      at /Users/cscetbon/src/git/serverless-kubeless/examples/get-python/node_modules/lodash/lodash.js:4905:15
      at baseForOwn (/Users/cscetbon/src/git/serverless-kubeless/examples/get-python/node_modules/lodash/lodash.js:2990:24)
      at /Users/cscetbon/src/git/serverless-kubeless/examples/get-python/node_modules/lodash/lodash.js:4874:18
      at Function.forEach (/Users/cscetbon/src/git/serverless-kubeless/examples/get-python/node_modules/lodash/lodash.js:9342:14)
      at /Users/cscetbon/src/git/serverless-kubeless/examples/get-python/node_modules/serverless-kubeless/deploy/kubelessDeploy.js:110:11
      at processTicksAndRejections (internal/process/task_queues.js:97:5)

     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com

  Your Environment Information ---------------------------
     Operating System:          darwin
     Node Version:              13.8.0
     Framework Version:         1.67.0
     Plugin Version:            3.6.1
     SDK Version:               2.3.0
     Components Version:        2.22.3

The issue from line https://github.com/serverless/serverless-kubeless/blob/master/deploy/kubelessDeploy.js#L85 where description.package is undefined. I'm using the default serverless.yaml provided I'm using version 0.9.2. I've been looking at that plugin a year ago and thought it was mature, but just following the tutorial fails..

donhui commented 3 years ago

I've met the problem as you too.

sepetrov commented 3 years ago

Hi @cscetbon , @donhui , replace python2.7 with python3.7. Runtime python2.7 does not exist any more.

donhui commented 3 years ago

Hi @sepetrov , I've replaced python2.7 with python3.7. But the problem still exist.

Gurkiran-Singh commented 3 years ago

Hi @cscetbon , @donhui , replace python2.7 with python3.7. Runtime python2.7 does not exist any more.

Hi @sepetrov Can we create the serverless-kubeless template with python2.7 runtime and then edit it to python3.7?

or Is there any other workaround by which we can use python3 instead of python2 for serverless-kubeless?

Any help/references would be appreciated. Thanks