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

Case Changes in command output

Open joteromontes opened this issue 9 months ago • 1 comments

Describe the bug

We have seen that case is often changing from version to version, the main issue is that there are some variables that changes the Case from the version 2.38 to the current version 2.60 as we can see in the image below. This is breaking developments done that rely on queries and pipelines that are indeed case sensitive. For example:

CLI Version 2.38

Command:az network nic list --output json Return: "PrivateIpAddress":

CLI Version 2.60

Command:az network nic list --output json Return: "PrivateIPAddress":

This is a huge problem, as developments for code that are working fine, now require a mayor revision due to this case change. We need to know what will be the definitive case usage.

In the same way we need to commit to not change previously working outputs as this will impact many customers that rely on Azure CLI for their deployments.

Related command

CLI Version 2.38

Command:az network nic list --output json Return: "PrivateIpAddress":

CLI Version 2.60

Command:az network nic list --output json Return: "PrivateIPAddress":

Errors

This case change is causing that query lines that are working on CLI version 2.38 do not work anymore on CLI 2.60

CLI Version 2.38

Command:az network nic list --output json Return: "PrivateIpAddress":

CLI Version 2.60

Command:az network nic list --output json Return: "PrivateIPAddress":

Issue script & Debug output

NA

Expected behavior

To have a consistent case usage in all versions of azure CLI.

Environment Summary

azure-cli 2.60.0

core 2.60.0 telemetry 1.1.0

Extensions: ai-examples 0.2.5 ml 2.25.1 resource-graph 2.1.0 ssh 2.0.3

Dependencies: msal 1.28.0 azure-mgmt-resource 23.1.0b2

Python location '/usr/bin/python3.9' Extensions directory '/home/juan/.azure/cliextensions' Extensions system directory '/usr/lib/python3.9/site-packages/azure-cli-extensions'

Additional context

can we get a confirmation on what is the correct case from now on:

Is this the correct way: "PrivateIpAddress": or is it "PrivateIPAddress":

joteromontes avatar May 02 '24 13:05 joteromontes

Thank you for opening this issue, we will look into it.

yonzhan avatar May 02 '24 13:05 yonzhan

@joteromontes it's by design, staring from around 2.43, we change such case things consistent with the response from server side, i.e., "PrivateIPAddres" is responded from server.

necusjz avatar May 06 '24 03:05 necusjz

@necusjz as this is breaking current automations for many customers, that are working with older cli versions due to such inconsistency in the case with the variable, we need to ask some confirmation.

Can you please confirm that this will not change in future CLI versions, enabling the customer to build automation scripts that will last for long time without breaking?

joteromontes avatar May 08 '24 14:05 joteromontes

Yes, it's the correct output and will be kept for long time without breaking.

jsntcy avatar May 08 '24 15:05 jsntcy