PrefectHQ / prefect

Prefect is a workflow orchestration framework for building resilient data pipelines in Python.
https://prefect.io
Apache License 2.0
15.96k stars 1.57k forks source link

"Inspect" CLI commands should support JSON output #13188

Open abrookins opened 5 months ago

abrookins commented 5 months ago

First check

Prefect Version

2.x

Describe the current behavior

Running a command like prefect work-pool inspect <name> always outputs object representations in Python objects.

Describe the proposed behavior

Running a command like prefect work-pool inspect <name> should support a flag to output the result in JSON.

Example Use

prefect work-pool inspect <name> --output=json prefect work-pool inspect <name> -o json

Additional context

There are times when it can be useful to save JSON representations to use as subsequent input to commands that expect JSON, such as prefect work-pool update <name> --base-job-template <file.json>.

serinamarie commented 5 months ago

Makes sense to me. I can implement a POC with the work I'm currently building in the global concurrency limit CLI.

serinamarie commented 4 months ago

Unassigned myself for now as this a variety of PRs may help close this issue.

serinamarie commented 4 months ago

The POC has been created in the above PR, so anyone can contribute easily to this!

olanna12 commented 4 months ago

Hi @abrookins! I would like to be assigned this issue.