Thanks Michele the changes look very good I did a first pass and left some comments
On Sat, Sep 15, 2018 at 7:20 PM Michele Sciabarra <[email protected]> wrote: > Hello, I just submitted a PR for a pretty large amount of work I did to > stabilize the OpenWhisk runtime for Go. > > The user-visible changes are: > > - updated the runtime to golang 1.11 > - changed the signature of actions to "func Main(args > map[string]interface{}) map[string]interface{}" > - implemented all the mandatory tests for runtimes, both to GoLang and > "pure" ActionLoop (with shell scripts) > - the runtime can still be used as a compiler to precompile and redure the > startup time, but now in a simpler way as a filter (no more volume mounts) > - In the tests, there are also examples showing the base runtime (the > action loop) is also a good runtime for shell script > > Under the hood, I did a lot of work: > > - internally now the compiler is a python script, no more a shell script, > easier to understand an maintain > - I use now the same code to process the action at init and when I use the > runtime as a compiler > - the compiler is now compiling also packages and vendor folder > - I optimized code in many places to avoid converting byte in string and > copying files > - I fixed a lot of bugs that emerged trying to implement the test, > everything from Unicode handling to environment variables to unexpected > limits in buffers and so on > - I also refactored tests to be easier to maintain (I had since I run them > a lot of times) > > The runtime is really very general, not just for Go. Just a python > script, a docker file, and an "epilogue" file should allow supporting a > lot of languages, and I hope to release some interesting developments I > have in mind in the next few months. At least I will complete soon the > Swift runtime I promised Carlos and the work I did is also making easier to > support more languages. And also be used alone as a basis as an alternative > to the dockerskeleton. Examples in the unit tests shows this usage and the > runtime passes those tests even without golang (just using bash). > > > -- > Michele Sciabarra > [email protected] >
