azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

AZURE CLI should add extension name to UserAgent but it doesn't work

Open xfz11 opened this issue 2 years ago • 2 comments

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Related command

This bug exists on every extension API request. Take containerapp extension as an example az containerapp list

Describe the bug

This line show that CLI should add extension name in UA but it doesn't work

https://github.com/Azure/azure-cli/blob/71ab97d61b4b70d2d37f5e3e465a16dbde37c1e8/src/azure-cli-core/azure/cli/core/commands/client_factory.py#L145

The actual UA is 'User-Agent': 'python/3.8.8 (Windows-10-10.0.22621-SP0) AZURECLI/2.46.0 (PIP)' not extension information.

To Reproduce

Expected behavior

UA should contains extension name. Besides, we expect extension version is also added in the UA as CLI core version.

Environment summary

Additional context

xfz11 avatar Mar 16 '23 04:03 xfz11

route to CXP team

yonzhan avatar Mar 16 '23 04:03 yonzhan

route to CXP team

It should be a bug in Azure CLI core. az container is just an example. Every extension has the same issue.

xfz11 avatar Mar 16 '23 05:03 xfz11