Skip to content

[BUG] duplicated keys 'eTag' and 'etag' #5262

@praveenm-symplr

Description

@praveenm-symplr

Describe the bug
az aks list is returning the result with eTag with empty value and etag with value. The same present within the agentPoolProfiles which is causing an issue when calling ConvertFrom-Json

ConvertFrom-Json : Cannot convert the JSON string because a dictionary that was converted from the string contains the
duplicated keys 'eTag' and 'etag'.

{
"eTag": null,
"etag": "some guid",
}

Optional: Set the appropriate GitHub label(s) to indicate the AKS feature or area you believe your bug relates to.

To Reproduce
Steps to reproduce the behavior:

  1. Run command 'az aks list | ConvertFrom-Json'

  2. Error: ConvertFrom-Json : Cannot convert the JSON string because a dictionary that was converted from the string contains the
    duplicated keys 'eTag' and 'etag'.
    `At line:1 char:15
    az aks list | ConvertFrom-Json

    • CategoryInfo : InvalidOperation: (:) [ConvertFrom-Json], InvalidOperationException
    • FullyQualifiedErrorId : DuplicateKeysInJsonString,Microsoft.PowerShell.Commands.ConvertFromJsonCommand`
  3. Run command 'az aks list'

  4. Check the response contains two etags- eTag and etag.

Expected behavior
There should be only one etag with proper value.

Screenshots

Image

Environment (please complete the following information):

Version Info
{
"azure-cli": "2.72.0",
"azure-cli-core": "2.72.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"account": "0.2.5",
"azure-devops": "0.26.0"
}
}

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions