-
Notifications
You must be signed in to change notification settings - Fork 87
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
Handler is not updated #42
Comments
I'll look into this at some point, I can see it is inconvenient. Not sure how to solve it yet. It may be that we need this function to change to be called on every invocation rather than just once - |
Hi, the function handler is still not updated to the latest. I am using the following versions:
|
Thanks for the report @frostyseb. I will reopen this and will look into it at some point |
@frostyseb A little update here. Did some testing and I came to the conclusion that 1) the handler needs to be re-imported on each invocation not just when we subscribe to the sns topic on initialization (as mentioned above) and 2) we need to be able to invalidate the node module cache. Sadly, 2 is not currently possible which is why I initially removed cache invalidation as a parameter in version 0.77.0 See: nodejs/node#49442 - tracking esm cache busting Once there is a solution available, I will resolve this issue. I have a branch ready to go. I was able to get this to work properly with a non-esm project using |
Hi @dsarlo , thank you very much for the update! I really appreciate your effort in this enhancement. Understandable on the esm cache busting issue and compatibility. We shall see how the node team will improve this. |
Hi,
Problem:
After starting serverless offline
serverless offline start
, I can publish a message on SNS offline without any problem, and the handler is running.When I change the code in my handler and publish again a message, the previous handler is run, and not the updated one.
I need to stop serverless offline and re-start it for the changes to be taken into account.
Why it matters:
For debug purposes, it'd be great to be able to change the handler test without having to re-start serverless offline every time.
Version:
node 8.10
Thanks!
The text was updated successfully, but these errors were encountered: