Skip to content

Auto Upgrade ignores --only-show-errors #28876

Description

@afscrome

Describe the bug

If you have auto upgrade enabled (az config set auto-upgrade.enable=yes), have an out of date Azure CLI and try to run the and run a command with --only-show-errors, the auto upgrade will write warning messages when the CLI is out of date.

If I pass --only-show-errors then I don't expect warnings to be shown.

Related command

Seems to be all commands

Errors

No error message - just unexpected warnings

Issue script & Debug output

az account get-access-token  --query expiresOn --only-show-errors

output:

This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Your current Azure CLI version is 2.58.0. Latest version available is 2.60.0.
Please check the release notes first: https://docs.microsoft.com/cli/azure/release-notes-azure-cli
Do you want to continue? (Y/n):

Expected behavior

The auto upgrade shouldn't have printed any warnings, nor prompt for me to upgrade since I explicitly told the command to only output errors (with --only-show-errors).

Environment Summary

azure-cli 2.58.0 *

core 2.58.0 *
telemetry 1.1.0

Extensions:
resource-graph 2.1.0

Dependencies:
msal 1.26.0
azure-mgmt-resource 23.1.0b2

Additional context

May be related to #28875.

Metadata

Metadata

Labels

ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAuto-AssignAuto assign by botAuto-ResolveAuto resolve by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamConfigureaz configure/configact-codegen-extensibility-squadact-identity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions