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/05/24 09:10:52 UTC
[GitHub] [openwhisk] ningyougang opened a new pull request, #5244: [Proposal] POEM: provide array result for all runtime images
ningyougang opened a new pull request, #5244:
URL: https://github.com/apache/openwhisk/pull/5244
<!--- Provide a concise summary of your changes in the Title -->
## Description
This is the POEM documentation for new feature providing `support array result for all runtim images`
I refer to this guide document for POEM: https://github.com/apache/openwhisk/blob/master/proposals/README.md
## Related issue and scope
<!--- Please include a link to a related issue if there is one. -->
- [ ] I opened an issue to propose and discuss this change (#????)
## My changes affect the following components
<!--- Select below all system components are affected by your change. -->
<!--- Enter an `x` in all applicable boxes. -->
- [ ] API
- [ ] Controller
- [ ] Message Bus (e.g., Kafka)
- [ ] Loadbalancer
- [ ] Scheduler
- [ ] Invoker
- [ ] Intrinsic actions (e.g., sequences, conductors)
- [ ] Data stores (e.g., CouchDB)
- [ ] Tests
- [x] Deployment
- [ ] CLI
- [ ] General tooling
- [ ] Documentation
## Types of changes
<!--- What types of changes does your code introduce? Use `x` in all the boxes that apply: -->
- [ ] Bug fix (generally a non-breaking change which closes an issue).
- [x] Enhancement or new feature (adds new functionality).
- [ ] Breaking change (a bug fix or enhancement which changes existing behavior).
## Checklist:
<!--- Please review the points below which help you make sure you've covered all aspects of the change you're making. -->
- [x] I signed an [Apache CLA](https://github.com/apache/openwhisk/blob/master/CONTRIBUTING.md).
- [ ] I reviewed the [style guides](https://github.com/apache/openwhisk/blob/master/CONTRIBUTING.md#coding-standards) and followed the recommendations (Travis CI will check :).
- [ ] I added tests to cover my changes.
- [ ] My changes require further changes to the documentation.
- [x] I updated the documentation where necessary.
--
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] ningyougang commented on a diff in pull request #5244: [Proposal] POEM: provide array result for all runtime images
Posted by GitBox <gi...@apache.org>.
ningyougang commented on code in PR #5244:
URL: https://github.com/apache/openwhisk/pull/5244#discussion_r929537243
##########
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:
Updated accordingly
##########
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:
Updated accordingly
##########
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:
Updated accordingly
--
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] ningyougang closed pull request #5244: [Proposal] POEM: provide array result for all runtime images
Posted by GitBox <gi...@apache.org>.
ningyougang closed pull request #5244: [Proposal] POEM: provide array result for all runtime images
URL: https://github.com/apache/openwhisk/pull/5244
--
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] ningyougang commented on pull request #5244: [Proposal] POEM: provide array result for all runtime images
Posted by GitBox <gi...@apache.org>.
ningyougang commented on PR #5244:
URL: https://github.com/apache/openwhisk/pull/5244#issuecomment-1173207585
Hi,guys.
Regarding `prvoide array result`, for common action or sequence action, i have implemented in my local, e.g. for this example: https://github.com/apache/openwhisk/blob/master/docs/actions.md#creating-action-sequences
I updated the split.js and sort.js like below and invoked successully using my local openwhisk codes
```split.js
function main(msg) {
var separator = msg.separator || /\r?\n/;
var payload = msg.payload.toString();
var lines = payload.split(separator);
return lines;
}
```
And
```sort.js
function main(msg) {
var lines = msg || [];
console.log('sort before: ' + lines);
lines.sort();
return lines;
}
```
--
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] ningyougang commented on a diff in pull request #5244: [Proposal] POEM: provide array result for all runtime images
Posted by GitBox <gi...@apache.org>.
ningyougang commented on code in PR #5244:
URL: https://github.com/apache/openwhisk/pull/5244#discussion_r929537344
##########
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:
Updated accordingly
--
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] style95 commented on a diff in pull request #5244: [Proposal] POEM: provide array result for all runtime images
Posted by GitBox <gi...@apache.org>.
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
[GitHub] [openwhisk] ningyougang merged pull request #5244: [Proposal] POEM: provide array result for all runtime images
Posted by GitBox <gi...@apache.org>.
ningyougang merged PR #5244:
URL: https://github.com/apache/openwhisk/pull/5244
--
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] codecov-commenter commented on pull request #5244: [Proposal] POEM: provide array result for all runtime images
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #5244:
URL: https://github.com/apache/openwhisk/pull/5244#issuecomment-1135767540
# [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5244?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#5244](https://codecov.io/gh/apache/openwhisk/pull/5244?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07f4d98) into [master](https://codecov.io/gh/apache/openwhisk/commit/7fdc246137162e937e54435e1f27d8d95e8e89d5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7fdc246) will **decrease** coverage by `13.68%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #5244 +/- ##
===========================================
- Coverage 79.18% 65.49% -13.69%
===========================================
Files 238 238
Lines 13965 13965
Branches 582 582
===========================================
- Hits 11058 9147 -1911
- Misses 2907 4818 +1911
```
| [Impacted Files](https://codecov.io/gh/apache/openwhisk/pull/5244?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...hisk/core/scheduler/message/ContainerMessage.scala](https://codecov.io/gh/apache/openwhisk/pull/5244/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9zY2hlZHVsZXIvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9vcGVud2hpc2svY29yZS9zY2hlZHVsZXIvbWVzc2FnZS9Db250YWluZXJNZXNzYWdlLnNjYWxh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...core/database/cosmosdb/RxObservableImplicits.scala](https://codecov.io/gh/apache/openwhisk/pull/5244/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvUnhPYnNlcnZhYmxlSW1wbGljaXRzLnNjYWxh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...ore/database/cosmosdb/cache/CacheInvalidator.scala](https://codecov.io/gh/apache/openwhisk/pull/5244/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9jb3Ntb3NkYi9jYWNoZS1pbnZhbGlkYXRvci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL29wZW53aGlzay9jb3JlL2RhdGFiYXNlL2Nvc21vc2RiL2NhY2hlL0NhY2hlSW52YWxpZGF0b3Iuc2NhbGE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...e/database/cosmosdb/cache/ChangeFeedConsumer.scala](https://codecov.io/gh/apache/openwhisk/pull/5244/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9jb3Ntb3NkYi9jYWNoZS1pbnZhbGlkYXRvci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL29wZW53aGlzay9jb3JlL2RhdGFiYXNlL2Nvc21vc2RiL2NhY2hlL0NoYW5nZUZlZWRDb25zdW1lci5zY2FsYQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...core/database/cosmosdb/CosmosDBArtifactStore.scala](https://codecov.io/gh/apache/openwhisk/pull/5244/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJBcnRpZmFjdFN0b3JlLnNjYWxh) | `0.00% <0.00%> (-95.85%)` | :arrow_down: |
| [.../openwhisk/core/scheduler/FPCSchedulerServer.scala](https://codecov.io/gh/apache/openwhisk/pull/5244/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9zY2hlZHVsZXIvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9vcGVud2hpc2svY29yZS9zY2hlZHVsZXIvRlBDU2NoZWR1bGVyU2VydmVyLnNjYWxh) | `0.00% <0.00%> (-95.84%)` | :arrow_down: |
| [...sk/core/database/cosmosdb/CosmosDBViewMapper.scala](https://codecov.io/gh/apache/openwhisk/pull/5244/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJWaWV3TWFwcGVyLnNjYWxh) | `0.00% <0.00%> (-93.90%)` | :arrow_down: |
| [...tabase/cosmosdb/cache/CacheInvalidatorConfig.scala](https://codecov.io/gh/apache/openwhisk/pull/5244/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9jb3Ntb3NkYi9jYWNoZS1pbnZhbGlkYXRvci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL29wZW53aGlzay9jb3JlL2RhdGFiYXNlL2Nvc21vc2RiL2NhY2hlL0NhY2hlSW52YWxpZGF0b3JDb25maWcuc2NhbGE=) | `0.00% <0.00%> (-92.31%)` | :arrow_down: |
| [...sk/core/scheduler/container/ContainerManager.scala](https://codecov.io/gh/apache/openwhisk/pull/5244/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9zY2hlZHVsZXIvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9vcGVud2hpc2svY29yZS9zY2hlZHVsZXIvY29udGFpbmVyL0NvbnRhaW5lck1hbmFnZXIuc2NhbGE=) | `0.00% <0.00%> (-88.61%)` | :arrow_down: |
| [...nwhisk/core/scheduler/queue/ContainerCounter.scala](https://codecov.io/gh/apache/openwhisk/pull/5244/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9zY2hlZHVsZXIvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9vcGVud2hpc2svY29yZS9zY2hlZHVsZXIvcXVldWUvQ29udGFpbmVyQ291bnRlci5zY2FsYQ==) | `0.00% <0.00%> (-84.22%)` | :arrow_down: |
| ... and [46 more](https://codecov.io/gh/apache/openwhisk/pull/5244/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/openwhisk/pull/5244?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5244?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [7fdc246...07f4d98](https://codecov.io/gh/apache/openwhisk/pull/5244?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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] ningyougang commented on a diff in pull request #5244: [Proposal] POEM: provide array result for all runtime images
Posted by GitBox <gi...@apache.org>.
ningyougang commented on code in PR #5244:
URL: https://github.com/apache/openwhisk/pull/5244#discussion_r929537106
##########
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:
Updated accordingly
##########
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:
Updated accordingly
##########
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:
Updated accordingly
##########
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:
Updated accordingly
--
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] ningyougang commented on pull request #5244: [Proposal] POEM: provide array result for all runtime images
Posted by GitBox <gi...@apache.org>.
ningyougang commented on PR #5244:
URL: https://github.com/apache/openwhisk/pull/5244#issuecomment-1197521158
Have any more comment?
--
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