Azure / Azure/azure-rest-api-specs

[BUG] Streamline Tag behavior accross resources

Open
#35,693 2 comments 0 reactions 0 assignees View on GitHub
bug customer-reported question
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 2h
Merged PRs (30d)
424

Description

### API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/actionGroups_API.json

### API Spec version

2021-09-01

### Describe the bug

Hi,
this is a general topic example is the difference in tag behavior between action groups and activity log alerts

Currently if an activity log alerts (without tags) the response will look like this:
GET https://management.azure.com/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/activityLogAlerts/SampleActivityLogAlertRule?api-version=2020-10-01
```
{
"id": "/subscriptions/.../activitylogalert-95604c020",
"name": "activitylogalert-95604c020",
"type": "Microsoft.Insights/ActivityLogAlerts",
"location": "Global",
"tags": {},
...
}
```

if you do the same on an action group without tags:
GET https://management.azure.com/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/Microsoft.Insights/actionGroups/SampleActionGroup?api-version=2021-09-01

```
{
"id": "/subscriptions/.../actiongroup-95604c020",
"type": "Microsoft.Insights/ActionGroups",
"name": "actiongroup-95604c020",
"location": "Global",
"kind": null,
"tags": null,
...
}
```

You should streamline if no tags means an empty dict or null within _all_ azure resources that use tags.

### Expected behavior

All resources answer with either
`tags: {}`
or
`tags: null`

when no tags are defined on a given resource that supports tags

### Actual behavior

One resource uses {} other uses null

### Reproduction Steps

Use the GET requests from description on resources without tags

### Environment

https://learn.microsoft.com/ and curl

Contributor guide

Open the contributing guide

Research direction

Start with specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/actionGroups_API.json and compare its tag behavior with the activity log alert API shown in the report. Use the provided GET requests with curl to confirm the discrepancy; done means the affected Azure resources consistently return either {} or null when no tags are defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, openapi
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.