TACC-Cloud / abaco-cli

Command line toolkit for developing, managing, and using Abaco Actors
Other
2 stars 3 forks source link

Support sending JSON message encoded in a file with "abaco submit" #20

Open mwvaughn opened 5 years ago

mwvaughn commented 5 years ago

A popular feature of the agave-cli is the ability to submit most complex data structures from files on disk. This is not really needed for most Abaco operations. However, abaco run is an exception.

When a user wishes to send a structured JSON document as the message payload, they must encode and quote it themselves, a shaky proposition in the UNIX command line. Add in any need to script job submission in subshell and it's nearly impossible. It is also challenging to share example messages with other users.

To address this:

  1. Extend abaco run to accept -F <filename>
  2. Read the file from disk, compressing and validating it as JSON using jq
  3. Send to the target actor's mailbox with a Content-Type: application/json header
mwvaughn commented 5 years ago

Implemented in:

mwvaughn commented 5 years ago

Reopening to test