openwhisk-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michele Sciabarra <mich...@sciabarra.com>
Subject Submitted PR for an actionloop based runtime for Python
Date Sun, 23 Dec 2018 16:01:01 GMT
Hello all,

I just submitted PR #44 for an actionloop based Python Runtime. In my tests, it is only slightly
slower than the top ones (1000 actions in 0.21 against 0.17 for the go and PHP based runtimes).
I tried to make it as backward compatible as possible.  It passes all the existing tests although
I had to modify a few of them to adapt to some (IHMO minor) differences in the runtimes.

Notable differences are:
- at init time it does not log the errors, but returns compilation errors in the answer, in
format {"error": "compilation error"}
- if the action produces at runtime an `{error` it still returns error code 200, not 502

In the first case, it happens because actionloop does not log anything at init time. I could
change it if needed but this way you have a consistent behavior in actionloop based runtimes.

In the second case, it is a bit tricky. I found a test expecting that when you raise an exception
in the action, I should return an "{"error:"...}" and set the error code to 502. Unfortunately,
because the only communication channel among the action running a loop and the web server
is a pipe, I should parse the answer (that can be large)  just to find it has a key "error"
for each request and I do not want to slow down the runtime just for setting this error code.

Please revise the PR#44 for the Python runtime. Note also that before all I need someone merges
the PR#4193 on incubator-openwhisk because test data are placed in the main repository so
far and I need a python37_virtualenv.zip there.


Mime
View raw message