-
Notifications
You must be signed in to change notification settings - Fork 115
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
inject into stack instead living separately #35
Comments
this will also prevent the second packaging call, which is currently really slow: serverless/serverless#4355 |
Hi @mvayngrib. Thanks for your feedback. 👌 Are you saying hook warmup to one initial event, inject it to the service and make warmup available to most of the SLS commands? Or is there more to it? |
@goncaloneves idk if what i was suggesting is possible for serverless plugins. I was thinking inject it into the serverless.yml |
That's exactly how it works @mvayngrib. What are you missing exactly? |
@juanjoDiaz serverless has a pretty slow |
That's interesting. Serverless uses globby to do the includes and excludes (which indeed seems to be slow based on sindresorhus/globby#43). I'm not 100% how serverless does it, But I would expect to run globby per function to find what should be include. That would mean that the speed should depend on how complex your include/exclude are in each function. So the speed of packaging the warmup lambda should be the same for an enormous project and for a project with 2 lambdas. Isn't that the case? |
@juanjoDiaz theoretically, yes :) but in practice, no. Even a function with zero deps will fall into the excludeDevDependencies time warp. See these issues: |
I'm not sure this plugin even needs to in inject functions. Why can't it just add a cloudwatch event? |
@dougmoscrop it could in it's current form, would make it simpler. But the intention of this plugin is to be able to deal with #24 eventually and not be just a schedule. For now I don't have time to dedicate to this, but is something that I am curious to build and see how it will play out. Closing this issue, nothing to be done on warmup side here. |
We have tonnes of instances of warmup left behind after the Serverless-created stacks they were for have been deleted. I'd like it if warmup's resources (functions, cloudwatch events, whatever) were a part of the stack just to make it easy to ensure it's deleted along with it. #51 added tags which helps, but annoying (especially retrospectively) to add separately from the |
Hi @OJFord, As mentioned in the older messages, the warmer lambda is part of the serverless-created stack. Are you using some old version? Or might the issue be somewhere else? |
if this function were injected into serverless.yml during preprocessing, then it could benefit from other goodies that serverless.yml functions enjoy: logging, command line invocation, etc.
The text was updated successfully, but these errors were encountered: