ibm-functions / shell

An Electron-based development tool for IBM Cloud Functions and Composer.
Apache License 2.0
60 stars 16 forks source link

composer.sequence is not working. #673

Closed neerajmangal closed 6 years ago

neerajmangal commented 6 years ago

Hi All,

I am trying fsh shell composer to create sequence but seems like the first action is getting executed and further actions are not executed. Though when created the same sequence via wsk command works.

fsh shell version -1.3.427

Steps I followed.

composer

hellocomposer.js

composer.sequence('/whisk.system/utils/echo', '/demo-ns/hello');

JSON { "composition": [{ "type": "action", "name": "/whisk.system/utils/echo" }, { "type": "action", "name": "/demo-ns/hello" }] }

I am only getting below result in output in this case.

{ "action": "/whisk.system/utils/echo", "params": { "name": "Neeraj Mangal" }, "state": { "$resume": { "state": 1, "stack": [] } } }

Though I am expecting this should call "hello" action. Please help me if I am missing anything here.

If I create the sequence with wsk command like below I am getting the right output of sequence.

` ./wsk -i action create testsequence --sequence /whisk.system/utils/echo,/demo-ns/hello

./wsk -i action invoke testsequence -p name "Neeraj Mangal" -r -b { "payload": "Hello Neeraj Mangal" } `

Thanks, Neeraj

starpit commented 6 years ago

hello @neerajmangal thanks for the bug report!

can you provide the version of the shell you are using? e.g. version from within the shell, or fsh version from a terminal. thanks

neerajmangal commented 6 years ago

Thanks @starpit for quick reply. Here is the version. fsh version 1.3.427

kerryspchang commented 6 years ago

Hi Neeraj, Could you do an activation list and see if echo and hello have generated any activations? Another suggestion: try enter session list, click on a session by hellocomposer and see if Shell returns the right result.

starpit commented 6 years ago

also, which openwhisk host are you using? e.g. a localhost installation, or IBM Cloud Functions us-south, or london, etc.. thank you

neerajmangal commented 6 years ago

Sorry @starpit, I should have mentioned these details.

I am running it on local installation of openwhisk. apart from that I do not see the hello and echo getting listed in activation list. { "action": "/whisk.system/utils/echo", "params": { "name": "Neeraj Mangal" }, "state": { "$resume": { "state": 1, "stack": [] } } }

image

Also session list is empty.

image

starpit commented 6 years ago

thanks! when was the last time you updated your local openwhisk installation? i.e. git pull and rebuild.

neerajmangal commented 6 years ago

Its quite some time. May be this can be the issue? is there any specific release date or version to which fsh shell is compatible with? If it is, I will upgrade it and try. Also if it is compatible with after any specific openwhisk release date, just a suggestion can we mention it somewhere in doc?

starpit commented 6 years ago

this sounds like the issue. the backend was updated about 3-4 weeks ago to support compositions natively. this provides some advantages, such as allowing us to avoid the use of redis for many common cases.

if you git pull your local openwhisk and rebuild and redeploy it, you should be good to go.

neerajmangal commented 6 years ago

Thanks @starpit !! I will try upgrading it and update here.

neerajmangal commented 6 years ago

@starpit , I upgraded my local environment to latest and now I see its working fine. Just a suggestion, can we add a note somewhere with which release or version/date of openwhisk it is compatible. Thanks for the help!!

starpit commented 6 years ago

that's great to hear. re: version compatibility. this is still an open question for us. you may rest assured that the openwhisk core support will be stable for the foreseeable future.