Skip to content

Support array result include sequence action#72

Merged
dgrove-oss merged 6 commits intoapache:masterfrom
ningyougang:support-array-result-include-sequence-action
Aug 15, 2022
Merged

Support array result include sequence action#72
dgrove-oss merged 6 commits intoapache:masterfrom
ningyougang:support-array-result-include-sequence-action

Conversation

@ningyougang
Copy link
Contributor

@ningyougang ningyougang commented Jul 25, 2022

Depend on below prs:

@ningyougang
Copy link
Contributor Author

sequence action also supports by default(includes 2.5 and 2.6), test steps as below

  • Write split.rb and sort.rb
[root@nccddev130026 ~]# cat split.rb 
def main(args)
  payload = args["payload"] || "aaa\nbbb\ncccc"
  separator = args["separator"] || "\n"
  result=payload.split(separator)
  puts result
  result
end

[root@nccddev130026 ~]# cat sort.rb 
def main(args)
  newResult = args.reverse
  puts newResult
  newResult
end
  • Create sequence action and invoke it (I tested ruby:2.5/2.6, worked well both)
wsk -i action create /whisk.system/utils/split-ruby --kind ruby:2.5 ~/split.rb
wsk -i action create /whisk.system/utils/sort-ruby --kind ruby:2.5 ~/sort.rb
wsk -i action create mySequence-ruby --sequence /whisk.system/utils/split-ruby,/whisk.system/utils/sort-ruby
wsk -i action invoke --result mySequence-ruby --param payload "dddd\nbbbb\ncccc\nfffffff\nggggggggg" -r -v

@ningyougang ningyougang force-pushed the support-array-result-include-sequence-action branch from f9e110d to 475c7ff Compare August 8, 2022 06:24
Copy link
Member

@dgrove-oss dgrove-oss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dgrove-oss dgrove-oss merged commit afce9ad into apache:master Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants