Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.68k stars 5.1k forks source link

[Logz] monitors DELETE API is broken #18572

Open ms-zhenhua opened 2 years ago

ms-zhenhua commented 2 years ago

Swagger Link

When attempting to delete a Logz Monitor instance and its Sub Account instance via Azure API, the flow failed as illustrated below.

Firstly delete the sub account instance as below:

DELETE https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctest-logz-220406162837808838/providers/Microsoft.Logz/monitors/acctest-lm-220406162837808838/accounts/acctest-lsa-220406162837808838?api-version=2020-10-01 HTTP/1.1

which returns a Long Running Request as shown below:

Azure-AsyncOperation: https://management.azure.com/providers/Microsoft.Logz/locations/WESTUS2/operationStatuses/c2ace76b-e04f-4628-9973-25cf8d8316cb*68E980A2C84E95C3472A9F7590A1A1B27D79DA89303EF4F6B0DB676658CF6EE8?api-version=2020-10-01

Then send several GET request to get operation Statuses:

GET https://management.azure.com/providers/Microsoft.Logz/locations/WESTUS2/operationStatuses/c2ace76b-e04f-4628-9973-25cf8d8316cb*68E980A2C84E95C3472A9F7590A1A1B27D79DA89303EF4F6B0DB676658CF6EE8?api-version=2020-10-01 HTTP/1.1

which eventually returns Succeeded (which should mean that the sub account no longer exists):

{"status":"Succeeded","startTime":"2022-04-06T08:37:12.628953Z","endTime":"2022-04-06T08:37:33.0894648Z","error":{},"properties":null}

At this time - it should be possible to delete the Monitor instance(as its sub account has already been deleted). Attempting to do so:

DELETE https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctest-logz-220406162837808838/providers/Microsoft.Logz/monitors/acctest-lm-220406162837808838?api-version=2020-10-01 HTTP/1.1

which fails though:

{"error":{"code":"CannotDeleteResource","message":"Can not delete resource before nested resources are deleted."}}

It looks like the same issue as #8137. The correlationId is:

x-ms-correlation-request-id: b448b03f-005d-e2de-356b-945108e254bb

Kindly help confirm this bug. Thanks.

RakeshMohanMSFT commented 2 years ago

@ms-zhenhua Thank you for reaching out, we are looking into it.

tombuildsstuff commented 2 years ago

@ms-zhenhua is this fixed?

ms-zhenhua commented 2 years ago

@tombuildsstuff , No, sorry, I closed it by mistake with other issues.

tombuildsstuff commented 1 year ago

@RakeshMohanMSFT it's coming up to a year since this was opened, any update on when this'll be fixed? Thanks!