googlegenomics / pipelines-api-examples

Examples for the Google Genomics Pipelines API.
BSD 3-Clause "New" or "Revised" License
50 stars 31 forks source link

Update poll.sh to support more "brief" output options #37

Closed mbookman closed 7 years ago

mbookman commented 7 years ago

When an operation completes, the poll.sh script emits the entire operation. This is often quite verbose and one needs to scroll back in their window to see simply whether the operation completed successfully or not.

gcloud supports some very nice output formatting options (see "gcloud topic formats"), and so for example it would be very nice if poll.sh finished by passing the command-line option:

--format='yaml(done, error, metadata.events)'

instead of just --format yaml

The user would see output like:

done: true
metadata:
  events:
  - description: start
    startTime: '2016-08-05T23:08:26.432090867Z'
  - description: pulling-image
    startTime: '2016-08-05T23:08:26.432154840Z'
  - description: localizing-files
    startTime: '2016-08-05T23:09:03.947223371Z'
  - description: running-docker
    startTime: '2016-08-05T23:09:03.947277516Z'
  - description: delocalizing-files
    startTime: '2016-08-06T00:26:22.863609038Z'
  - description: ok
    startTime: '2016-08-06T00:26:24.296178476Z'
pgrosu commented 7 years ago

Very cool Matt - thanks for sharing!

mbookman commented 7 years ago

Implemented this as port of https://github.com/googlegenomics/pipelines-api-examples/pull/39.