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] Microsoft.Consumption/usageDetails does not return entries with multiple tags when a tag is included in the filter #29063

Open
Maome opened this issue May 10, 2024 · 0 comments
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Consumption Service customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue points to a problem in the management-plane of the library. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team.

Comments

@Maome
Copy link

Maome commented May 10, 2024

API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-11-01/consumption.json

API Spec version

2023-11-01

Describe the bug

https://management.azure.com/subscriptions/{subscription}/providers/Microsoft.Consumption/usageDetails?api-version=2023-11-01&%24filter=tags%20eq%20%27dev%3Atools%27

Will return entries for a resource with "tags": {"dev": "tools"}
But it will not return entries for a resource with "tags": {"dev": "tools", "foo": "bar"}

Expected behavior

Entries are returned for all resources matching the tag supplied in the filter, even if they have additional other tags.

Actual behavior

Entries are not returned for resources with additional tags beyond just the one supplied in the filter.

Reproduction Steps

1. Create two resources with the given tags:
Resource One:

"tags": {
    "dev": "tools"
}

Resource Two:

"tags": {
    "dev": "tools",
    "foo": "bar"
}

2. Attempt to get usageDetails filtering by tag:

GET https://management.azure.com/subscriptions/{subscription}/providers/Microsoft.Consumption/usageDetails?api-version=2023-11-01&%24filter=tags%20eq%20%27dev%3Atools%27

3. Observe that only one resource is returned
👀

Environment

Reproduced with:

  • azure-mgmt-consumption==10.0.0 with API versions 2023-05-01 and 2023-11-01 on Python 3.9.19
  • Azure Consumption rest API's "try it now" feature with API versions 2023-05-01 and 2023-11-01
@Maome Maome added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label May 10, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. labels May 10, 2024
@zzhxiaofeng zzhxiaofeng added Consumption Service Mgmt This issue points to a problem in the management-plane of the library. Service Attention This issue is responsible by Azure service team. labels May 10, 2024
@Maome Maome changed the title [BUG] Microsoft.Consumption/usageDetails does return entries with multiple tags when a tag is included in the filter [BUG] Microsoft.Consumption/usageDetails does not return entries with multiple tags when a tag is included in the filter May 10, 2024
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. Consumption Service customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue points to a problem in the management-plane of the library. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

2 participants