microsoft / microsoft/planetary-computer-tasks

Add option to status watch command to give JSON output

Open
#37 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
43
Forks
19
Avg merge
1h 23m
Merged PRs (30d)
1

Description

The command which currently polls for workflow status is pctasks records status workflow --watch ${WORKFLOW_ID}. This provides useful console output for users to see how their workflow is progressing. However, it would also be useful for any automated systems that submit a workflow and want to wait until the job succeeds or fails. In that case, it would be ideal to have some JSON output to stdout that gives job information, like whether it passed or failed, so that one could script downstream processing based on the result of the workflow.

E.g. something like pctasks records status workflow --watch --json ${WORKFLOW_ID}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the pctasks records status workflow --watch ${WORKFLOW_ID} command entry point and trace how its polling output is produced. Add the proposed --json mode so automated callers receive workflow status information on stdout, including success or failure, and verify the existing watch behavior remains available.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.