Azure / Azure/azure-rest-api-specs

QueryPackQuery.Update API cannot update the `Related` property when it isn't set at creation

Open
#20,152 0 comments 0 reactions 0 assignees View on GitHub
Monitor - Operational Insights Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 2h
Merged PRs (30d)
424

Description

While testing, I found [QueryPackQuery.Update](https://github.com/Azure/azure-rest-api-specs/blob/d62bf7ac84940147fc5c0faceaac111b1a8c360d/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/QueryPackQueries.json#L191) API cannot update the `Related` property and throws below error message after the Query Pack Query is created successfully without setting the `Related` property. Seems there is a bug at service side while initiating object. Could you help take a look and fix the issue? Thanks in advance.

Request payload:
```
PATCH https://management.azure.com/subscriptions/xx-xx-xx-xx/resourceGroups/acctestRG-LA-test21/providers/Microsoft.OperationalInsights/queryPacks/acctestlaqp-test21/queries/xx-xx-xx-xx?api-version=2019-09-01

{
"properties": {
"id": "xx-xx-xx-xx",
"displayName": "Exceptions - New in the last 24 hours",
"body": "xxxxxxxxxx",
"related": {
"solutions": [
"AlertManagement"
]
}
}
}
```

Error message:
```
{
"error": {
"code": "InternalServerError",
"message": "Object reference not set to an instance of an object.",
"innererror": {
"trace": [
"System.NullReferenceException"
]
}
}
}
```

Contributor guide

Open the contributing guide

Research direction

Start with specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/QueryPackQueries.json and inspect the QueryPackQuery.Update operation against the reported PATCH payload. Determine whether the specification can represent this update or whether the failure is entirely service-side; done means documenting or correcting the applicable specification behavior, if this repository owns it.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.