-
Notifications
You must be signed in to change notification settings - Fork 23
Support array result include sequence action #150
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
Support array result include sequence action #150
Conversation
The steps of test support array result for sequence action in swift(4.2, 5.1, 5.3)
[root@nccddev130026 ~]# cat ~/split.swift
func main(args: Any) -> Any {
// don't do real split operation, just return array for next action's input param
return ["e1", "e2"]
}
[root@nccddev130026 ~]# cat ~/sort.swift
func main(args: Any) -> Any {
// don't do real sort operation, just return the array direclty
return args
}
wsk -i action create /whisk.system/utils/split-swift --kind swift:5.3 ~/split.swift
wsk -i action create /whisk.system/utils/sort-swift --kind swift:5.3 ~/sort.swift
wsk -i action create mySequence-swift --sequence /whisk.system/utils/split-swift,/whisk.system/utils/sort-swift
wsk -i action invoke --result mySequence-swift -r -v |
2b4df84
to
9252363
Compare
@@ -33,15 +33,38 @@ The traditional support for the dictionary still works: | |||
```swift | |||
import Foundation | |||
|
|||
func main(args: [String:Any]) -> [String:Any] { | |||
if let name = args["name"] as? String { | |||
func main(args: Any) -> Any { |
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.
In order to support array result, from the new main signature. we can see, the the input param and outout param should be changed to Any
both.
core/swift51Action/Dockerfile
Outdated
|
||
FROM swift:5.1.5 | ||
|
||
# select the builder to use | ||
ARG GO_PROXY_BUILD_FROM=release | ||
ARG GO_PROXY_BUILD_FROM=source |
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.
Need to change it to release
due to apache/openwhisk-runtime-java#140 (comment)
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.
Already changed to release
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.
LGTM
Depend on below prs:
Support array result for common action and sequence action openwhisk#5290
Support array result include sequence action openwhisk-runtime-go#170
Support array result