-
Notifications
You must be signed in to change notification settings - Fork 417
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
Support serverless run
#269
Comments
Hi @kbrandwijk . Great idea 🙌 This would indeed be a great addition. Having the hook implemented would be quite easy. What I'm thinking about is, if a watch option (like the one for sls-offline or sls invoke local) would be possible in the run scenario. I will dig into this a bit - as Docker support was added too recently by the possibility to enable watch polling instead of filesystem events with a switch, that might be possible. |
I haven't got the watching part working with |
@kbrandwijk Could you check if my PR works as expected? On my Windows system I get up to where the functions are loaded into the emulator, but after that it breaks (Ubuntu shell). I think I can get the watch mode running - in a similar way as the local invoke does, but just with respawning the run command on a source change. But I have to add and check that on my Ubuntu. |
I'm also on Windows. I have that same issue. I just start |
I checked the contents of the emulator storage and they contain the compiled sources which looks ok so far. Starting |
Added it - now the needed node modules are correctly copied to the emulator. |
The command seems to work for me now. I played a bit with getting watch working. I managed to let webpack watch the directory, and it got triggered correctly, but it seems that the run command locks the directory. I have to check if I somehow can get arount the deletion of the service directory for the run command. Then it should work.... stand by, I'm working on it.
I solved that problem now and the recompile is suceesfully triggered, but as soon as it tries to register the functions again, SLS fails with:
I have to find out, how to unregister functions from the gateway or just deploy them again. |
I got the watch option working correctly now and will update the PR after some cleanup! Then you can use PR has been updated. Could you please try with both variants? |
Released with |
This is a Feature Proposal
Description
For feature proposals:
What is the use case that should be solved. The more detail you describe this in the easier it is to understand for us.
Add support for
serverless run
by listening to thebefore:run:run
hook.If there is additional config how would it look
Something similar to this:
https://github.com/serverless-heaven/serverless-webpack/blob/master/index.js#L130-L132
I recently added the same feature to serverless-plugin-typescript (for reference):
https://github.com/graphcool/serverless-plugin-typescript/blob/master/src/index.ts#L31-L37
The text was updated successfully, but these errors were encountered: