cli
cli copied to clipboard
`--log-as-json` should not be present as a flag under `dapr list`
Expected Behavior
When running dapr list --log-as-json
, I expect the output to be in JSON format.
Actual Behavior
The output is in the default table format.
Steps to Reproduce the Problem
% dapr --version
CLI version: 1.2.0-rc.2
Runtime version: 1.2.0-rc.3
% dapr list --help
List all Dapr instances. Supported platforms: Kubernetes and self-hosted
Usage:
dapr list [flags]
Examples:
# List Dapr instances in self-hosted mode
dapr list
# List Dapr instances in Kubernetes mode
dapr list -k
Flags:
-h, --help Print this help message
-k, --kubernetes List all Dapr pods in a Kubernetes cluster
Global Flags:
--log-as-json Log output in JSON format
% dapr list --log-as-json
APP ID HTTP PORT GRPC PORT APP PORT COMMAND AGE CREATED PID
Ninjabronze-Reaper 54536 54537 0 4m 2021-05-25 10:36.29 28261
@philliphoff I believe the idea was that --log-as-json
was for logs from daprd and the application not a change in the output format.
cc @pkedy
Sure, though in that case I'd argue that it's still a bug to show the option under the list
command. :-)
That said, an "output as JSON" option for list
would be helpful in allowing other tools to wrap it. For example, the VS Code extension currently has logic to extract running Dapr applications from the local process list. That's exactly what dapr list
does! It'd be nice to eliminate that implementation in order reuse the Dapr CLI's implementation, but its current format makes parsing, while possible, more complicated than necessary.
@philliphoff Can you create a separate feature request for output as JSON/YAML for dapr list
? Leaving this issue to fix the issue where --log-as-json
shows up under dapr list
opened a new issue listing this requirement https://github.com/dapr/cli/issues/728
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue, help wanted or triaged/resolved. Thank you for your contributions.
bug still present