Azure-rest-api-specs: Subnet previously used by deleted api management service cannot be deleted

Created on 6 Nov 2018  ·  22Comments  ·  Source: Azure/azure-rest-api-specs

Seems like ApiManagementService_Delete should be a long-running operation.
See https://github.com/Azure/azure-sdk-for-go/issues/2199 for more details.

API Management

All 22 comments

@jhendrixMSFT out of interest, is there a rough timeframe for this?

We need to get the RP engaged. @solankisamir do you own this?

@jhendrixMSFT yes we own this. If a subnet is not freed, once the API Management service is deleted, this usually means some issue and best would be to open a support case. The subnet is freed by API Management service within 30 minutes of service getting deleted.

@solankisamir I believe that the subnet is being freed, the question is the semantics of the API. It's returning a 200 which states that the resource has been deleted however this is misleading as the delete is in progress. Should this be modeled as a LRO? @ravbhatnagar do you have any opinion on this?

@jhendrixMSFT @solankisamir since this issue was originally opened in July 2018 would it be possible to escalate this to the Service Team? Based on this comment it appears the Subnet isn't usable for up to 2 hours during any change to it at the moment, which means we'd have to poll for this long (which I'd like to avoid if possible).

Thanks!

@tombuildsstuff we are committed to fixing this behavior. But this would require a new api-version to not break existing clients. We are working on 2019-01-01 apiversion, which should be out by the end of the month.

Hi @solankisamir, sounds good. If this will be fixed in version 2019-01-01 would be great!

We updated the service side code to make DELETE a long-running operation. Will be working through updating the REST spec and the SDKs. This is currently happening on 2018-06-01-preview version and will soon be switched to 2019-01-01

Release Notes

@solankisamir - any idea when this will be in the specs? The problem with updating the service side before the specs is that delete operations from clients are now failing as the service is returning 202, which the client can't handle as it isn't in the specs.

The problem with updating the service side before the specs is that delete operations from clients are now failing as the service is returning 202, which the client can't handle as it isn't in the specs.

On this note - isn't this technically a breaking change since it didn't previously return this status code and this isn't listed in the Swagger?

It is indeed - deleting api management from terraform now fails

Error deleting API Management Service "apim8naix" (Resource Group "fixtures8naix"): apimanagement.ServiceClient#Delete: Failure responding to request: StatusCode=202 -- Original Error: autorest/azure: Service returned an error. Status=202 Code="Unknown" Message="Unknown service error"

@hbuckle would you mind opening an issue on our side, so we can patch this?

The problem with updating the service side before the specs is that delete operations from clients are now failing as the service is returning 202, which the client can't handle as it isn't in the specs.

On this note - isn't this technically a breaking change since it didn't previously return this status code and this isn't listed in the Swagger?

2018-06-01-preview is a preview version of the API, where we can make breaking changes. 2019-01-01 or 2018-01-01 are stable versions, where this becomes our liability.
I will update the spec soon

Fair point - I didn't realise Terraform was using the preview API. @tombuildsstuff 2018-01-01 is still returning 200 for deletes

@solankisamir is there an expected timeline for when the Swagger for 2019-01-01 will be available?

@hbuckle thanks for opening that issue/letting us know - @katbyte has updated TF to use the 2018-01-01 API for the moment

ping @solankisamir :)

@tombuildsstuff we are just wrapping up a couple of changes required for the stable api-version change. Will update the thread asap. Should be done within a week or two.

@solankisamir cool thanks 👍

hey @solankisamir

Is there an updated ETA for this? We've got some features blocked which dependent on this new API version:

Thanks!

awesome thanks 👍
I was searching by the “API Management” label so I missed that

The Spec has been released here and the GO SDK has been updated here

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mcardosos picture mcardosos  ·  6Comments

tombuildsstuff picture tombuildsstuff  ·  5Comments

neil-yechenwei picture neil-yechenwei  ·  8Comments

lmazuel picture lmazuel  ·  4Comments

yupwei68 picture yupwei68  ·  8Comments