-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Proposal] POEM: provide array result for all runtime images #5244
[Proposal] POEM: provide array result for all runtime images #5244
Conversation
dd68177
to
07f4d98
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5244 +/- ##
==========================================
- Coverage 79.97% 75.27% -4.70%
==========================================
Files 238 238
Lines 14199 14199
Branches 577 577
==========================================
- Hits 11355 10689 -666
- Misses 2844 3510 +666 ☔ View full report in Codecov by Sentry. |
Hi,guys. I updated the split.js and sort.js like below and invoked successully using my local openwhisk codes function main(msg) {
var separator = msg.separator || /\r?\n/;
var payload = msg.payload.toString();
var lines = payload.split(separator);
return lines;
} And function main(msg) {
var lines = msg || [];
console.log('sort before: ' + lines);
lines.sort();
return lines;
} |
07f4d98
to
ec27073
Compare
--> | ||
# Title | ||
|
||
Currently, openwhisk supports return json object only, e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, openwhisk supports return json object only, e.g. | |
Currently, OpenWhisk supports returning a JSON object only, e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated accordingly
"greeting": "Hello stranger!" | ||
} | ||
``` | ||
It is necessary to support return array for common action, e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is necessary to support return array for common action, e.g. | |
It is necessary to support returning an array too as an array is also a proper JSON object, e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated accordingly
"b" | ||
] | ||
``` | ||
For sequence action, need to support as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For sequence action, need to support as well. | |
The sequence action should be considered as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated accordingly
|
||
# Summary and Motivation | ||
|
||
This POEM proposes a new feature that allows user to write their own action which supports array result. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This POEM proposes a new feature that allows user to write their own action which supports array result. | |
This POEM proposes a new feature that allows user to write their own action which supports an array result. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated accordingly
# 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the result will support object and array both in future. | |
So actions would be able to return a JSON object or an array. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated accordingly
Make controller and invoker support array result both. | ||
|
||
## Runtime repos | ||
All runtime images should support array result. e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All runtime images should support array result. e.g. | |
All runtime images should support an array result. e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated accordingly
|
||
# Proposed changes | ||
## Openwhisk main repo | ||
Make controller and invoker support array result both. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make controller and invoker support array result both. | |
Make controller and invoker support both a JSON object and an array result. |
* ballerina | ||
|
||
## Openwhisk-cli repo | ||
* When use wsk to execute action, need to support parse array result. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* When use wsk to execute action, need to support parse array result. | |
* The `wsk` CLI needs to support parsing an array result when executing actions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated accordingly
|
||
## 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* When use wsk to get activation, need to support parse array result as well. | |
* The `wsk` CLI needs to support parsing an array result when getting activations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated accordingly
ec27073
to
7166b6f
Compare
7166b6f
to
d4899a6
Compare
Have any more comment? |
Description
This is the POEM documentation for new feature providing
support array result for all runtime images
I refer to this guide document for POEM: https://github.com/apache/openwhisk/blob/master/proposals/README.md
Related issue and scope
My changes affect the following components
Types of changes
Checklist: