prefect describe CLI does not return JSON
See original GitHub issueDescription
prefect describe
calls seem to give back no valid JSON but just a printed Python Dict. To make it more useful in downstream commands to e.g. parse the output via jq it would be great if this is JSON. Maybe that was even intended, not sure if it is a bug or enhancement.
One example:
prefect describe flows --name TestRecoGenerationFlow_dev | jq
parse error: Invalid numeric literal at line 1, column 8
Output of this looks like the following:
{'name': 'TestRecoGenerationFlow_dev', 'version': 17, 'created': '2020-07-07T12:43:44.554817+00:00', 'description': None, ...
With the None
values instead of null
it is clear that this is no JSON
Expected Behavior
Proper returning of JSON so that it can be used in downstream tools or pipes.
Reproduction
prefect describe flows --name <anyname> | jq
Environment
{
"config_overrides": {},
"env_vars": [],
"system_information": {
"platform": "macOS-10.15.4-x86_64-i386-64bit",
"prefect_version": "0.12.2",
"python_version": "3.8.2"
}
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
describe CLI command outputs dictionary instead of json #1813
Successfully merging a pull request may close this issue. Add --output option to describe CLI commands for JSON output PrefectHQ/prefect.
Read more >Results - Prefect 2 - Coordinating the world's dataflows
When results are persisted to storage, they are always written as a JSON document. The schema for this is described by the PersistedResultBlob...
Read more >prefect.cli.deployment - Coordinating the world's dataflows
Prefect command line interface for working with deployments.
Read more >prefect.client - Prefect 2 - Coordinating the world's dataflows
A no-op context will be returned if the context for the given application is already being managed. This manager is robust to concurrent...
Read more >build | Prefect Docs
This command builds all specified flows and writes their metadata to a JSON file. These flows can then be registered without building later...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Cool, I’ll push up a quick fix for this.
Yeah @jcrist JSON should be made the default