Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output format is not respected on macOS #20336

Closed
mattias-kindborg-at-work opened this issue Nov 15, 2021 · 2 comments
Closed

Output format is not respected on macOS #20336

mattias-kindborg-at-work opened this issue Nov 15, 2021 · 2 comments
Assignees
Labels
Core CLI core infrastructure customer-reported Issues that are reported by GitHub users external to the Azure organization.
Milestone

Comments

@mattias-kindborg-at-work
Copy link

mattias-kindborg-at-work commented Nov 15, 2021

Describe the bug

On macOS, after upgrading from Azure CLI v2.29.0 to v2.30.0, output formatting options aren't respected. Formatting options have been verified to work on v2.30.0 running Windows or Ubuntu, but not macOS.

Command Name

All commands where output is formatted, e.g. az group create --name foo --location eastus --output none and az iot hub list --query "[?name=='foo'] | length(@)".

Errors:

Response is always formatted as JSON indifferent of --output argument, and --query with a filter doesn't work at all but instead displays the result as if the query wasn't even applied.

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Example 1 where output format isn't respected.

$ az group create --name foo --location eastus --output none
> {
>   "id": "/subscriptions/<id>/resourceGroups/foo",
>   "location": "eastus",
>   "managedBy": null,
>   "name": "foo",
>   "properties": {
>     "provisioningState": "Succeeded"
>   },
>   "tags": null,
>   "type": "Microsoft.Resources/resourceGroups"
> }

Example 2 where query isn't respected, and the response should be the length of the result, not the result itself.

$ az iot hub list --query "[?name=='foo'] | length(@)"
> [
>   { ... },
>   { ... },
>   { ... }
> ]

Expected Behavior

Example 1

$ az group create --name foo --location eastus --output none

Example 2

$ az iot hub list --query "[?name=='foo'] | length(@)"
> 0

Environment Summary

macOS-11.6-x86_64-i386-64bit, Darwin 20.6.0
Python 3.9.8
Installer: HOMEBREW

azure-cli 2.30.0

Extensions:
azure-iot 0.11.0

Additional Context

@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Nov 15, 2021
@yonzhan yonzhan added the Core CLI core infrastructure label Nov 15, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Nov 15, 2021
@yonzhan yonzhan removed the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label Nov 15, 2021
@yonzhan yonzhan added this to the Backlog milestone Nov 15, 2021
@yonzhan
Copy link
Collaborator

yonzhan commented Nov 15, 2021

@jiasli for awareness

@jiasli
Copy link
Member

jiasli commented Nov 16, 2021

Duplicate of #20269

@jiasli jiasli marked this as a duplicate of #20269 Nov 16, 2021
@jiasli jiasli closed this as completed Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core CLI core infrastructure customer-reported Issues that are reported by GitHub users external to the Azure organization.
Projects
None yet
Development

No branches or pull requests

3 participants