You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2022/07/25 09:18:10 UTC

[GitHub] [openwhisk-runtime-python] ningyougang opened a new pull request, #129: Support array result include sequence action

ningyougang opened a new pull request, #129:
URL: https://github.com/apache/openwhisk-runtime-python/pull/129

   Depend on below prs: 
   - https://github.com/apache/openwhisk/pull/5290 (If want to this pr's travis ci passed, should merge 5290 firstly)
   - https://github.com/apache/openwhisk-runtime-go/pull/170 (because python also uses go runtime's actionProxy)
   
   - [x] Support array result
     - [x] make python runtime to support array result for common action
     - [x] make python runtime to support array result for sequence action (support array as input param)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [openwhisk-runtime-python] ningyougang commented on pull request #129: Support array result include sequence action

Posted by GitBox <gi...@apache.org>.
ningyougang commented on PR #129:
URL: https://github.com/apache/openwhisk-runtime-python/pull/129#issuecomment-1193797269

   Python supports sequence action by default with support array result, test steps as below
   * Write split.py and sort.py
   ```py
   [root@nccddev130026 ~]# cat ~/split.py 
   def main(args):
       payload = args.get("payload", "aaaa\nbbbb\nccccc")
       separator = args.get("separator", "\n")
       result = payload.split(separator)
       return result
   
   [root@nccddev130026 ~]# cat ~/sort.py 
   def main(args):
       if args is None:
           args = ["data1", "data2", "data3"]
       result = args[::-1]
       return result
   ```
   
   * Create action and invoke it (python:3.7/3.9 both tested, worked well both)
   ```shell
   wsk -i action create /whisk.system/utils/split-python --kind python:3.7 ~/split.py
   wsk -i action create /whisk.system/utils/sort-python --kind python:3.7 ~/sort.py
   wsk -i action create mySequence-python --sequence /whisk.system/utils/split-python,/whisk.system/utils/sort-python
   wsk -i action invoke --result mySequence-python --param payload "dddd\nbbbb\ncccc\nfffffff\nggggggggg" -r -v
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [openwhisk-runtime-python] dgrove-oss merged pull request #129: Support array result include sequence action

Posted by GitBox <gi...@apache.org>.
dgrove-oss merged PR #129:
URL: https://github.com/apache/openwhisk-runtime-python/pull/129


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [openwhisk-runtime-python] ningyougang commented on a diff in pull request #129: Support array result include sequence action

Posted by GitBox <gi...@apache.org>.
ningyougang commented on code in PR #129:
URL: https://github.com/apache/openwhisk-runtime-python/pull/129#discussion_r945440183


##########
core/python310Action/Dockerfile:
##########
@@ -31,12 +31,12 @@ RUN curl -sL \
   https://github.com/apache/openwhisk-runtime-go/archive/{$GO_PROXY_RELEASE_VERSION}.tar.gz\
   | tar xzf -\
   && cd openwhisk-runtime-go-*/main\
-  && GO111MODULE=on go build -o /bin/proxy
+  && GO111MODULE=on CGO_ENABLED=0 go build -o /bin/proxy
 
 FROM python:3.10-buster
 
 # select the builder to use
-ARG GO_PROXY_BUILD_FROM=release
+ARG GO_PROXY_BUILD_FROM=source

Review Comment:
   Already changed to `release` to apply `1.18@1.20.0` tag



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [openwhisk-runtime-python] ningyougang commented on a diff in pull request #129: Support array result include sequence action

Posted by GitBox <gi...@apache.org>.
ningyougang commented on code in PR #129:
URL: https://github.com/apache/openwhisk-runtime-python/pull/129#discussion_r941954657


##########
core/python310Action/Dockerfile:
##########
@@ -31,12 +31,12 @@ RUN curl -sL \
   https://github.com/apache/openwhisk-runtime-go/archive/{$GO_PROXY_RELEASE_VERSION}.tar.gz\
   | tar xzf -\
   && cd openwhisk-runtime-go-*/main\
-  && GO111MODULE=on go build -o /bin/proxy
+  && GO111MODULE=on CGO_ENABLED=0 go build -o /bin/proxy
 
 FROM python:3.10-buster
 
 # select the builder to use
-ARG GO_PROXY_BUILD_FROM=release
+ARG GO_PROXY_BUILD_FROM=source

Review Comment:
   Need to change it to `release` due to https://github.com/apache/openwhisk-runtime-java/pull/140#discussion_r939689436



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org