Azure / azure-cli

Azure Command-Line Interface
MIT License
4.02k stars 2.99k forks source link

when trying to retreive application insights key, the reply with connection-string is varied #27208

Open anishp55 opened 1 year ago

anishp55 commented 1 year ago

Describe the bug

when using az spring build-service builder buildpack-binding show -n default --resource-group <> --service <> --subscription <> the json response with the connection-string value is varied. sometimes its connection_string others is connection-string

Related command

az spring build-service builder buildpack-binding show -n default --resource-group <> --service <> --subscription <>

Errors

the command doesn't fail, just building anything around the cli or using it via python requires extra checking and validation

Issue script & Debug output

from azure.cli.core import get_default_cli

cli: any = get_default_cli()

cli.invoke(
        [
            'spring',
            'build-service',
            'builder',
            'buildpack-binding',
            'show',
            '-n',
            'default',
            '--resource-group',
            'asa-e-rg-01',
            '--service',
            'asa-e-si-02',
            '--subscription',
            '5c6097b3-0798-4146-8d81-1e3ef0686c2d'
        ]
    )

print(cli.result.result)
data = cli.result.result
print(data['properties']['launchProperties']['properties']['connection_string'])

Expected behavior

to not fail, or have a the keys be the same and not change from _ to - as a sperator

Environment Summary

az cli 2.51 account | 0.2.5 application-insights | 0.1.19 serviceconnector-passwordless | 0.3.8 spring | 1.14.0

Additional context

No response

yonzhan commented 1 year ago

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

microsoft-github-policy-service[bot] commented 1 year ago

Thank you for your feedback. This has been routed to the support team for assistance.