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/21 11:04:08 UTC

[GitHub] [openwhisk] style95 commented on a diff in pull request #5244: [Proposal] POEM: provide array result for all runtime images

style95 commented on code in PR #5244:
URL: https://github.com/apache/openwhisk/pull/5244#discussion_r926540173


##########
proposals/POEM-support-array-result.md:
##########
@@ -0,0 +1,70 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+# Title
+
+Currently, openwhisk supports return json object only, e.g.

Review Comment:
   ```suggestion
   Currently, OpenWhisk supports returning a JSON object only, e.g.
   ```



##########
proposals/POEM-support-array-result.md:
##########
@@ -0,0 +1,70 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+# Title
+
+Currently, openwhisk supports return json object only, e.g.
+```shell
+# wsk action invoke hello -r
+{
+    "greeting": "Hello stranger!"
+}
+```
+It is necessary to support return array for common action, e.g.

Review Comment:
   ```suggestion
   It is necessary to support returning an array too as an array is also a proper JSON object, e.g.
   ```



##########
proposals/POEM-support-array-result.md:
##########
@@ -0,0 +1,70 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+# Title
+
+Currently, openwhisk supports return json object only, e.g.
+```shell
+# wsk action invoke hello -r
+{
+    "greeting": "Hello stranger!"
+}
+```
+It is necessary to support return array for common action, e.g.
+```shell
+# wsk action invoke hello-array -r
+[
+    "a",
+    "b"
+]
+```
+For sequence action, need to support as well.

Review Comment:
   ```suggestion
   The sequence action should be considered as well.
   ```



##########
proposals/POEM-support-array-result.md:
##########
@@ -0,0 +1,70 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+# Title
+
+Currently, openwhisk supports return json object only, e.g.
+```shell
+# wsk action invoke hello -r
+{
+    "greeting": "Hello stranger!"
+}
+```
+It is necessary to support return array for common action, e.g.
+```shell
+# wsk action invoke hello-array -r
+[
+    "a",
+    "b"
+]
+```
+For sequence action, need to support as well.
+
+# Status
+* Current state: In-progress
+* Author(s): @ningyougang
+
+# Summary and Motivation
+
+This POEM proposes a new feature that allows user to write their own action which supports array result.

Review Comment:
   ```suggestion
   This POEM proposes a new feature that allows user to write their own action which supports an array result.
   ```



##########
proposals/POEM-support-array-result.md:
##########
@@ -0,0 +1,70 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+# Title
+
+Currently, openwhisk supports return json object only, e.g.
+```shell
+# wsk action invoke hello -r
+{
+    "greeting": "Hello stranger!"
+}
+```
+It is necessary to support return array for common action, e.g.
+```shell
+# wsk action invoke hello-array -r
+[
+    "a",
+    "b"
+]
+```
+For sequence action, need to support as well.
+
+# Status
+* Current state: In-progress
+* Author(s): @ningyougang
+
+# Summary and Motivation
+
+This POEM proposes a new feature that allows user to write their own action which supports array result.
+So the result will support object and array both in future.

Review Comment:
   ```suggestion
   So actions would be able to return a JSON object or an array.
   ```



##########
proposals/POEM-support-array-result.md:
##########
@@ -0,0 +1,70 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+# Title
+
+Currently, openwhisk supports return json object only, e.g.
+```shell
+# wsk action invoke hello -r
+{
+    "greeting": "Hello stranger!"
+}
+```
+It is necessary to support return array for common action, e.g.
+```shell
+# wsk action invoke hello-array -r
+[
+    "a",
+    "b"
+]
+```
+For sequence action, need to support as well.
+
+# Status
+* Current state: In-progress
+* Author(s): @ningyougang
+
+# Summary and Motivation
+
+This POEM proposes a new feature that allows user to write their own action which supports array result.
+So the result will support object and array both in future.
+
+# Proposed changes
+## Openwhisk main repo
+Make controller and invoker support array result both.
+
+## Runtime repos
+All runtime images should support array result. e.g.

Review Comment:
   ```suggestion
   All runtime images should support an array result. e.g.
   ```



##########
proposals/POEM-support-array-result.md:
##########
@@ -0,0 +1,70 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+# Title
+
+Currently, openwhisk supports return json object only, e.g.
+```shell
+# wsk action invoke hello -r
+{
+    "greeting": "Hello stranger!"
+}
+```
+It is necessary to support return array for common action, e.g.
+```shell
+# wsk action invoke hello-array -r
+[
+    "a",
+    "b"
+]
+```
+For sequence action, need to support as well.
+
+# Status
+* Current state: In-progress
+* Author(s): @ningyougang
+
+# Summary and Motivation
+
+This POEM proposes a new feature that allows user to write their own action which supports array result.
+So the result will support object and array both in future.
+
+# Proposed changes
+## Openwhisk main repo
+Make controller and invoker support array result both.
+
+## Runtime repos
+All runtime images should support array result. e.g.
+
+* nodejs (supports by default)
+* go
+* java
+* python
+* php
+* shell
+* docker
+* ruby
+* dotnet
+* rust
+* swift 
+* deno
+* ballerina
+
+## Openwhisk-cli repo
+* When use wsk to execute action, need to support parse array result.
+* When use wsk to get activation, need to support parse array result as well.

Review Comment:
   ```suggestion
   * The `wsk` CLI needs to support parsing an array result when getting activations.
   ```



##########
proposals/POEM-support-array-result.md:
##########
@@ -0,0 +1,70 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+# Title
+
+Currently, openwhisk supports return json object only, e.g.
+```shell
+# wsk action invoke hello -r
+{
+    "greeting": "Hello stranger!"
+}
+```
+It is necessary to support return array for common action, e.g.
+```shell
+# wsk action invoke hello-array -r
+[
+    "a",
+    "b"
+]
+```
+For sequence action, need to support as well.
+
+# Status
+* Current state: In-progress
+* Author(s): @ningyougang
+
+# Summary and Motivation
+
+This POEM proposes a new feature that allows user to write their own action which supports array result.
+So the result will support object and array both in future.
+
+# Proposed changes
+## Openwhisk main repo
+Make controller and invoker support array result both.

Review Comment:
   ```suggestion
   Make controller and invoker support both a JSON object and an array result.
   ```



##########
proposals/POEM-support-array-result.md:
##########
@@ -0,0 +1,70 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+# Title
+
+Currently, openwhisk supports return json object only, e.g.
+```shell
+# wsk action invoke hello -r
+{
+    "greeting": "Hello stranger!"
+}
+```
+It is necessary to support return array for common action, e.g.
+```shell
+# wsk action invoke hello-array -r
+[
+    "a",
+    "b"
+]
+```
+For sequence action, need to support as well.
+
+# Status
+* Current state: In-progress
+* Author(s): @ningyougang
+
+# Summary and Motivation
+
+This POEM proposes a new feature that allows user to write their own action which supports array result.
+So the result will support object and array both in future.
+
+# Proposed changes
+## Openwhisk main repo
+Make controller and invoker support array result both.
+
+## Runtime repos
+All runtime images should support array result. e.g.
+
+* nodejs (supports by default)
+* go
+* java
+* python
+* php
+* shell
+* docker
+* ruby
+* dotnet
+* rust
+* swift 
+* deno
+* ballerina
+
+## Openwhisk-cli repo
+* When use wsk to execute action, need to support parse array result.

Review Comment:
   ```suggestion
   * The `wsk` CLI needs to support parsing an array result when executing actions.
   ```



-- 
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