require() deployed nodejs function instead of executing inline#789
Conversation
|
Thanks for the PR @ianserlin. It looks good to me but can you add a small section in the |
|
@andresmgot Roger that, added instructions and sample to the |
|
Thank you for updating the docs. One more thing, can you build and push (to your own repo) the nodejs images and change the reference at |
|
This would be useful for us as well, do we just need CircleCI to go green before we can land this? |
|
yes, we need to build the image and change the |
|
Any chance of getting this progressed? Being unable to run webpacked code is severely limiting the usefulness of the nodejs support here. |
|
cc/ @ianserlin are you able to continue with this? |
|
Yes, I can work on the requested changes this week. We've already gone to production with this setup. |
|
This is very useful addition. And, the accompanying explanation is useful too. Keep going 👍 |
|
Landing this since it has been rebased. Thank you all for the input and sorry for the slow response! |
Issue Ref: #779
Description:
A simple change to how the user's code is run in
kubeless.jsallows webpacked functions to work out of the box and requires no changes to the way existing non-webpacked functions are written or deployed.Note that this change means the user's function code is
require()-d from disk on each run instead of being read as a string into memory once on pod startup.However, this has a negligible effect on performance for the following reasons:
That means that the size of code loaded as dependencies from disk will typically far outweigh the size of the function itself, making this one additional load from disk negligible as long as this package management solution is used.
Hope that makes sense.
TODOs: