Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][Resource Graph] Resource Graph API returns inconsistent casing for the resource group name in the 'id' field when query the resources with type Microsoft.CognitiveServices/accounts #31379

Open
ChenxiJiang333 opened this issue Nov 1, 2024 · 1 comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. Resource Graph Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@ChenxiJiang333
Copy link
Member

API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2024-04-01/resourcegraph.json#L37

API Spec version

2024-04-01

Describe the bug

The casing of the 'id' field is being inconsistently returned when query the resources with type Microsoft.CognitiveServices/accounts with Resource Graph API, when it contains upper case letters.
For example, using a resource group named 'BA-Test', firstly the 'id' field is returned with this in mixed case (/resourceGroups/BA-Test/) and after deploy a model in the AI Service, it would become lower case (/resourceGroups/ba-test/).

Expected behavior

Response to have consistent casing for the resource group in the 'id' field, every time, preferably the mixed casing to match the console.

Actual behavior

Resource group name in the 'id' field in the response would turn into lower case once deploy a model in the AI Service and turn back to mixed case once the deployed model removed.

Reproduction Steps

API: https://learn.microsoft.com/en-us/rest/api/azureresourcegraph/resourcegraph/resources/resources?view=rest-azureresourcegraph-resourcegraph-2024-04-01
Request body: "query": "Resources | project id, name, type, resourceGroup | where type =~ 'Microsoft.CognitiveServices/accounts'"
Steps:

  1. Create an Azure AI Services resource in the console using a mixed case resource group (for example BA-Test)

  2. Call the api and the print out for the relevant resource will (most likely) be:

    /subscriptions/my-sub-id/resourceGroups/BA-Test/providers/Microsoft.CognitiveServices/accounts/casing-test
    ba-test

  3. Navigate to AI Studio from this resource and deploy a model (i used gpt-4). Then call the api with same body and response is likely to be:

    /subscriptions/my-sub-id/resourceGroups/ba-test/providers/Microsoft.CognitiveServices/accounts/casing-test
    ba-test

Environment

No response

@ChenxiJiang333 ChenxiJiang333 added bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. Resource Graph Service Attention Workflow: This issue is responsible by Azure service team. labels Nov 1, 2024
Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @chiragg4u.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. Resource Graph Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

1 participant