apache / openwhisk-composer

Apache OpenWhisk Composer provides a high-level programming model in JavaScript for composing serverless functions
https://openwhisk.apache.org/
Apache License 2.0
68 stars 21 forks source link

compose and deploy are two separate commands #30

Open rabbah opened 5 years ago

rabbah commented 5 years ago

compose --deploy in the past allowed one to conveniently lower the composition and deploy it in one command. Now there are two binaries compose and deploy.

what's the rationale for separating them completely (that is, why remove --deploy from compose which could delegate to deploy)?

tardieu commented 5 years ago

Once upon a time, we wanted to separate the part of composer that depends on a connection to an OpenWhisk deployment from the part that does not, hence the split between the two commands. There was also a theory about integration with the OpenWhisk CLI.

I agree that from a user perspective a single command or CLI integration would make more sense. On my long-term todo list...

dgrove-oss commented 4 years ago

ran into this when update travis2slack to composer 0.11.0. Not having a single command makes the scripting slightly more annoying since one has to deal with a tmp file just to get the output from compose as input to deploy.

Another alternative would be to support getting the json input to deploy from stdin. Then something like: compose foo.js | deploy - foo could work.