Azure / Azure/azure-cli

az resource list with --query parameter returns inconsistent results across multiple runs

Open
#23,212 7 comments 0 reactions 1 assignee Assigned to @zhoxing-ms View on GitHub
act-identity-squad ARM Auto-Assign Azure CLI Team bug
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Related command**
az resource list --tag freeforpipeline=true --query "[?type=='Microsoft.ContainerService/managedClusters']" --debug

**Describe the bug**
`az resource list` with `--query` parameter returns inconsistent results across multiple runs. I have used the `--debug` flag and can clearly see that the service is returning the correct data in the GET request payload, but that data is not being consistently returned in the result of the `az resource list` call. Sometimes it works, sometimes it doesn't work. In my case my list should always return 5 items, but sometimes it's returning 5 and sometimes it's returning 0. Repeated runs can quickly fluctuate between 5 and 0 results. There are no changes on the actual resources in question, they should always match the query.

**To Reproduce**
Create a few resources with a tag (my tag was `freeforpipeline=true`) and try to query them with `az resource list --query`.

**Expected behavior**
My collection of 5 resources should be returned every time, because all 5 of them match

**Environment summary**
I have reproduced this problem in 2 environments:

**Linux**
Install method: apt
Shell: Bash

```
azure-cli 2.37.0 *

core 2.37.0 *
telemetry 1.0.6

Extensions:
k8s-extension 1.2.3
k8s-configuration 1.5.1
aks-preview 0.5.58

Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1

Python location '/opt/az/bin/python3'
Extensions directory '/home/matthchr/.azure/cliextensions'

Python (Linux) 3.10.4 (main, May 23 2022, 14:03:04) [GCC 7.5.0]

```

**Windows**
Install method: MSI
Shell: cmd.exe

```
C:\Users\matthchr>az --version
azure-cli 2.38.0

core 2.38.0
telemetry 1.0.6

Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\matthchr\.azure\cliextensions'

Python (Windows) 3.10.5 (tags/v3.10.5:f377153, Jun 6 2022, 15:58:59) [MSC v.1929 32 bit (Intel)]
```

**Additional context**

**Logs from a successful call:**
```
cli.knack.cli: Command arguments: ['resource', 'list', '--tag', 'freeforpipeline=true', '--query', "[?type=='Microsoft.ContainerService/managedClusters']", '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
Init colorama.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [, , ]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'resource': ['azure.cli.command_modules.resource']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: resource 0.021 47 207
cli.azure.cli.core: Total (1) 0.021 47 207
cli.azure.cli.core: Loaded 47 groups, 207 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : resource list
cli.azure.cli.core: Command table: resource list
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate []
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\matthchr\.azure\commands\2022-07-14.13-52-33.resource_list.7200.log'.
az_command_data_logger: command args: resource list --tag {} --query {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [.add_subscription_parameter at 0x043E9E38>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [.add_ids_arguments at 0x043E9F10>, .add_cache_arguments at 0x044154A8>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [, , .parse_ids_arguments at 0x04415460>]
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ResourceManagementClient
cli.azure.cli.core.auth.persistence: build_persistence: location='C:\\Users\\matthchr\\.azure\\msal_token_cache.bin', encrypt=True
cli.azure.cli.core.auth.binary_cache: load: C:\Users\matthchr\.azure\msal_http_cache.bin
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: openid_config = {'token_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/kerberos', 'tenant_region_scope': 'WW', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: 39d26044-ec00-4eed-a1fc-7c59356be38a
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resources?$filter=tagname%20eq%20%27freeforpipeline%27%20and%20tagvalue%20eq%20%27true%27&$expand=createdTime%2CchangedTime%2CprovisioningState&api-version=2021-04-01'
cli.azure.cli.core.sdk.policies: Request method: 'GET'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'e2982475-03b6-11ed-8262-1ca0b874ba40'
cli.azure.cli.core.sdk.policies: 'CommandName': 'resource list'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--tag --query --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.38.0 (MSI) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.5 (Windows-10-10.0.19044-SP0)'
cli.azure.cli.core.sdk.policies: 'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: This request has no body
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resources?$filter=tagname%20eq%20%27freeforpipeline%27%20and%20tagvalue%20eq%20%27true%27&$expand=createdTime%2CchangedTime%2CprovisioningState&api-version=2021-04-01 HTTP/1.1" 200 1767
cli.azure.cli.core.sdk.policies: Response status: 200
cli.azure.cli.core.sdk.policies: Response headers:
cli.azure.cli.core.sdk.policies: 'Cache-Control': 'no-cache'
cli.azure.cli.core.sdk.policies: 'Pragma': 'no-cache'
cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=utf-8'
cli.azure.cli.core.sdk.policies: 'Content-Encoding': 'gzip'
cli.azure.cli.core.sdk.policies: 'Expires': '-1'
cli.azure.cli.core.sdk.policies: 'Vary': 'Accept-Encoding'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-reads': '11999'
cli.azure.cli.core.sdk.policies: 'x-ms-request-id': 'cfe7657b-51b1-4e4d-b3c3-61cb696fece2'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': 'cfe7657b-51b1-4e4d-b3c3-61cb696fece2'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'WESTUS:20220714T205234Z:cfe7657b-51b1-4e4d-b3c3-61cb696fece2'
cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies: 'Date': 'Thu, 14 Jul 2022 20:52:34 GMT'
cli.azure.cli.core.sdk.policies: 'Content-Length': '1767'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"value":[{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/MC_resourcegroup-azure-operators_aso-azdo-aks-2_southcentralus/providers/Microsoft.Network/loadBalancers/kubernetes","name":"kubernetes","type":"Microsoft.Network/loadBalancers","sku":{"name":"Standard"},"location":"southcentralus","tags":{"freeforpipeline":"true"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/MC_resourcegroup-azure-operators_aso-azdo-aks-2_southcentralus/providers/Microsoft.Network/networkSecurityGroups/aks-agentpool-37244336-nsg","name":"aks-agentpool-37244336-nsg","type":"Microsoft.Network/networkSecurityGroups","location":"southcentralus","tags":{"freeforpipeline":"true"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/MC_resourcegroup-azure-operators_aso-azdo-aks-2_southcentralus/providers/Microsoft.Network/virtualNetworks/aks-vnet-37244336","name":"aks-vnet-37244336","type":"Microsoft.Network/virtualNetworks","location":"southcentralus","tags":{"freeforpipeline":"true"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/MC_resourcegroup-azure-operators_aso-azdo-aks-5_eastus/providers/Microsoft.Network/loadBalancers/kubernetes","name":"kubernetes","type":"Microsoft.Network/loadBalancers","sku":{"name":"Standard"},"location":"eastus","tags":{"aks-managed-cluster-name":"aso-azdo-aks-5","aks-managed-cluster-rg":"resourcegroup-azure-operators","freeforpipeline":"true"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/MC_resourcegroup-azure-operators_aso-azdo-aks-5_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/omsagent-aso-azdo-aks-5","name":"omsagent-aso-azdo-aks-5","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"eastus","tags":{"freeforpipeline":"true"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/MC_resourcegroup-azure-operators_aso-azdo-aks-5_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aso-azdo-aks-5-agentpool","name":"aso-azdo-aks-5-agentpool","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"eastus","tags":{"freeforpipeline":"true"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/MC_resourcegroup-azure-operators_aso-azdo-aks-5_eastus/providers/Microsoft.Network/networkSecurityGroups/aks-agentpool-26624594-nsg","name":"aks-agentpool-26624594-nsg","type":"Microsoft.Network/networkSecurityGroups","location":"eastus","tags":{"freeforpipeline":"true"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/MC_resourcegroup-azure-operators_aso-azdo-aks-5_eastus/providers/Microsoft.Network/virtualNetworks/aks-vnet-26624594","name":"aks-vnet-26624594","type":"Microsoft.Network/virtualNetworks","location":"eastus","tags":{"freeforpipeline":"true"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/MC_resourcegroup-azure-operators_aso-azdo-aks-5_eastus/providers/Microsoft.Compute/virtualMachineScaleSets/aks-agentpool-26624594-vmss","name":"aks-agentpool-26624594-vmss","type":"Microsoft.Compute/virtualMachineScaleSets","sku":{"name":"Standard_DS2_v2","tier":"Standard","capacity":3},"location":"eastus","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourcegroups/MC_resourcegroup-azure-operators_aso-azdo-aks-5_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/omsagent-aso-azdo-aks-5":{"principalId":"a8101eea-d404-4274-9514-f8ddce59cde5","clientId":"d6bb9358-feb4-47de-8432-78b5ed11323c"},"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/MC_resourcegroup-azure-operators_aso-azdo-aks-5_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aso-azdo-aks-5-agentpool":{"principalId":"baed742f-30a7-4597-a7b2-e0e4bf12c175","clientId":"07115d3b-cc36-4604-aeb3-0d4dfd7ab1bb"},"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourcegroups/MC_resourcegroup-azure-operators_aso-azdo-aks-5_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/kubedashboard-aso-azdo-aks-5":{"principalId":"a626a9ba-e917-4e81-bfae-a67f7d9b28ad","clientId":"751ccf94-7087-46c5-ae65-a58bb84123f8"}}},"tags":{"freeforpipeline":"true","orchestrator":"Kubernetes:1.21.2","poolName":"agentpool"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/MC_resourcegroup-azure-operators_aso-azdo-aks-3_westus/providers/Microsoft.Network/loadBalancers/kubernetes","name":"kubernetes","type":"Microsoft.Network/loadBalancers","sku":{"name":"Standard"},"location":"westus","tags":{"freeforpipeline":"true"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/mc_resourcegroup-azure-operators_aso-azdo-aks-3_westus/providers/Microsoft.Network/routeTables/aks-agentpool-77519960-routetable","name":"aks-agentpool-77519960-routetable","type":"Microsoft.Network/routeTables","location":"westus","tags":{"freeforpipeline":"true"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/MC_resourcegroup-azure-operators_aso-azdo-aks-3_westus/providers/Microsoft.Network/networkSecurityGroups/aks-agentpool-77519960-nsg","name":"aks-agentpool-77519960-nsg","type":"Microsoft.Network/networkSecurityGroups","location":"westus","tags":{"freeforpipeline":"true"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/MC_resourcegroup-azure-operators_aso-azdo-aks-3_westus/providers/Microsoft.Network/virtualNetworks/aks-vnet-77519960","name":"aks-vnet-77519960","type":"Microsoft.Network/virtualNetworks","location":"westus","tags":{"freeforpipeline":"true"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/resourcegroup-azure-operators/providers/Microsoft.ContainerService/managedClusters/aso-azdo-aks","name":"aso-azdo-aks","type":"Microsoft.ContainerService/managedClusters","location":"westus2","identity":{"principalId":"ffb29867-45ef-463f-8a4f-36de6c3dc513","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"tags":{"freeforpipeline":"true"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/MC_resourcegroup-azure-operators_aso-azdo-aks_westus2/providers/Microsoft.Network/loadBalancers/kubernetes","name":"kubernetes","type":"Microsoft.Network/loadBalancers","sku":{"name":"Standard"},"location":"westus2","tags":{"freeforpipeline":"true"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/MC_resourcegroup-azure-operators_aso-azdo-aks_westus2/providers/Microsoft.Network/networkSecurityGroups/aks-agentpool-32927831-nsg","name":"aks-agentpool-32927831-nsg","type":"Microsoft.Network/networkSecurityGroups","location":"westus2","tags":{"freeforpipeline":"true"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/resourcegroup-azure-operators/providers/Microsoft.ContainerService/managedClusters/aso-azdo-aks-2","name":"aso-azdo-aks-2","type":"Microsoft.ContainerService/managedClusters","location":"southcentralus","identity":{"principalId":"45c8424f-d3a1-4cb0-b4e8-b5e109b0a3df","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"tags":{"freeforpipeline":"true"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/resourcegroup-azure-operators/providers/Microsoft.ContainerService/managedClusters/aso-azdo-aks-3","name":"aso-azdo-aks-3","type":"Microsoft.ContainerService/managedClusters","location":"westus","identity":{"principalId":"6582259d-cd55-40bd-b5ae-4ef4ce77ad69","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"tags":{"freeforpipeline":"true"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/resourcegroup-azure-operators/providers/Microsoft.ContainerService/managedClusters/aso-azdo-aks-4","name":"aso-azdo-aks-4","type":"Microsoft.ContainerService/managedClusters","location":"westus2","identity":{"principalId":"c0afbab2-4b9f-4562-a8b3-64f3a2a65364","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"tags":{"freeforpipeline":"true"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/MC_resourcegroup-azure-operators_aso-azdo-aks-4_westus2/providers/Microsoft.Network/loadBalancers/kubernetes","name":"kubernetes","type":"Microsoft.Network/loadBalancers","sku":{"name":"Standard"},"location":"westus2","tags":{"freeforpipeline":"true"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/MC_resourcegroup-azure-operators_aso-azdo-aks-4_westus2/providers/Microsoft.Network/networkSecurityGroups/aks-agentpool-17654644-nsg","name":"aks-agentpool-17654644-nsg","type":"Microsoft.Network/networkSecurityGroups","location":"westus2","tags":{"freeforpipeline":"true"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/MC_resourcegroup-azure-operators_aso-azdo-aks-4_westus2/providers/Microsoft.Network/virtualNetworks/aks-vnet-17654644","name":"aks-vnet-17654644","type":"Microsoft.Network/virtualNetworks","location":"westus2","tags":{"freeforpipeline":"true"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/resourcegroup-azure-operators/providers/Microsoft.ContainerService/managedClusters/aso-azdo-aks-5","name":"aso-azdo-aks-5","type":"Microsoft.ContainerService/managedClusters","location":"eastus","identity":{"principalId":"3b6744b0-5723-41df-9ace-8901f6190f4c","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"tags":{"freeforpipeline":"true"}},{"id":"/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/MC_resourcegroup-azure-operators_aso-azdo-aks-5_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/kubedashboard-aso-azdo-aks-5","name":"kubedashboard-aso-azdo-aks-5","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"eastus","tags":{"freeforpipeline":"true"}}]}
cli.knack.cli: Event: CommandInvoker.OnTransformResult [, ]
cli.knack.cli: Event: CommandInvoker.OnFilterResult [.filter_output at 0x04E638E0>]
[
{
"changedTime": null,
"createdTime": null,
"extendedLocation": null,
"id": "/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/resourcegroup-azure-operators/providers/Microsoft.ContainerService/managedClusters/aso-azdo-aks",
"identity": {
"principalId": "ffb29867-45ef-463f-8a4f-36de6c3dc513",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"type": "SystemAssigned",
"userAssignedIdentities": null
},
"kind": null,
"location": "westus2",
"managedBy": null,
"name": "aso-azdo-aks",
"plan": null,
"properties": null,
"provisioningState": null,
"resourceGroup": "resourcegroup-azure-operators",
"sku": null,
"tags": {
"freeforpipeline": "true"
},
"type": "Microsoft.ContainerService/managedClusters"
},
{
"changedTime": null,
"createdTime": null,
"extendedLocation": null,
"id": "/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/resourcegroup-azure-operators/providers/Microsoft.ContainerService/managedClusters/aso-azdo-aks-2",
"identity": {
"principalId": "45c8424f-d3a1-4cb0-b4e8-b5e109b0a3df",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"type": "SystemAssigned",
"userAssignedIdentities": null
},
"kind": null,
"location": "southcentralus",
"managedBy": null,
"name": "aso-azdo-aks-2",
"plan": null,
"properties": null,
"provisioningState": null,
"resourceGroup": "resourcegroup-azure-operators",
"sku": null,
"tags": {
"freeforpipeline": "true"
},
"type": "Microsoft.ContainerService/managedClusters"
},
{
"changedTime": null,
"createdTime": null,
"extendedLocation": null,
"id": "/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/resourcegroup-azure-operators/providers/Microsoft.ContainerService/managedClusters/aso-azdo-aks-3",
"identity": {
"principalId": "6582259d-cd55-40bd-b5ae-4ef4ce77ad69",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"type": "SystemAssigned",
"userAssignedIdentities": null
},
"kind": null,
"location": "westus",
"managedBy": null,
"name": "aso-azdo-aks-3",
"plan": null,
"properties": null,
"provisioningState": null,
"resourceGroup": "resourcegroup-azure-operators",
"sku": null,
"tags": {
"freeforpipeline": "true"
},
"type": "Microsoft.ContainerService/managedClusters"
},
{
"changedTime": null,
"createdTime": null,
"extendedLocation": null,
"id": "/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/resourcegroup-azure-operators/providers/Microsoft.ContainerService/managedClusters/aso-azdo-aks-4",
"identity": {
"principalId": "c0afbab2-4b9f-4562-a8b3-64f3a2a65364",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"type": "SystemAssigned",
"userAssignedIdentities": null
},
"kind": null,
"location": "westus2",
"managedBy": null,
"name": "aso-azdo-aks-4",
"plan": null,
"properties": null,
"provisioningState": null,
"resourceGroup": "resourcegroup-azure-operators",
"sku": null,
"tags": {
"freeforpipeline": "true"
},
"type": "Microsoft.ContainerService/managedClusters"
},
{
"changedTime": null,
"createdTime": null,
"extendedLocation": null,
"id": "/subscriptions/4ef44fef-c51d-4d7c-a6ff-8635c02848b1/resourceGroups/resourcegroup-azure-operators/providers/Microsoft.ContainerService/managedClusters/aso-azdo-aks-5",
"identity": {
"principalId": "3b6744b0-5723-41df-9ace-8901f6190f4c",
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"type": "SystemAssigned",
"userAssignedIdentities": null
},
"kind": null,
"location": "eastus",
"managedBy": null,
"name": "aso-azdo-aks-5",
"plan": null,
"properties": null,
"provisioningState": null,
"resourceGroup": "resourcegroup-azure-operators",
"sku": null,
"tags": {
"freeforpipeline": "true"
},
"type": "Microsoft.ContainerService/managedClusters"
}
]
cli.knack.cli: Event: Cli.SuccessfulExecute []
cli.knack.cli: Event: Cli.PostExecute []
az_command_data_logger: exit code: 0
cli.__main__: Command ran in 1.557 seconds (init: 0.633, invoke: 0.924)
telemetry.save: Save telemetry record of length 2928 in cache
telemetry.check: Negative: The C:\Users\matthchr\.azure\telemetry.txt was modified at 2022-07-14 13:45:52.753201, which in less than 600.000000 s
```

The key difference seem to be that the successful request has `'x-ms-routing-request-id': 'WESTUS:20220714T205234Z:cfe7657b-51b1-4e4d-b3c3-61cb696fece2'`, while the request that doesn't filter correctly has `'x-ms-routing-request-id': 'WESTCENTRALUS:20220714T205344Z:f72a16df-5452-456d-88f9-fa1d7c86c89b'`

The request that doesn't filter correctly has the resource types cased differently than the one that works:
Routing request from WestUS cases it like this: `Microsoft.ContainerService/managedClusters`
Routing request from WestCentralUS cases it like this: `microsoft.containerservice/managedclusters`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.