Open magodo opened 2 years ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @vnetsuppgithub.
Author: | magodo |
---|---|
Assignees: | - |
Labels: | `Service Attention`, `Network - Virtual Network`, `needs-triage` |
Milestone: | - |
@magodo
I have checked with server team, and get the current server behavior is correct and aligned with Microsoft Azure REST API Guidelines
PUT storage account is a long running operation. Per Microsoft Azure REST API Guidelines , it should "returns a 200-OK response with the current state of the status monitor". And you can find the request success/Fail from the "status" in the responds.
@blueww What you described above is the behavior of the azure-asyncoperation
, as is defined here, whilst the current RP is using the location
header, whose flow is defined here, that it doesn't use "status".
Also see the reply from the Go SDK team: https://github.com/Azure/go-autorest/pull/705#issuecomment-1190754589
@magodo
The API for this issue is "PUT" StorageAccount, and it is Long-running operation (see swagger definition here.)
As the request is Long-running operation, it must follow up the Microsoft Azure REST API Guidelines. From this doc, you can see :
From the doc you provide, I see “If the operation is complete, return the exact same response that would have been returned had the operation been executed synchronously.” The 2 doc seems not so aligned since for the failed scenarios, Microsoft Azure REST API Guidelines still return 200 with status = Failed. And this doc says "return the exact same response that would have been returned had the operation been executed synchronously".
@ArcturusZhang, @qiaozha, @jianyexi Do you have any idea for the 2 docs seems not so align?
I've heard from the Swagger team that the RPC repo is authoritive than the API guideline.
Ping @ArcturusZhang and @jianyexi, any update on this?
The creation (
PUT
) of storage account doesn't failed as expected when setting a subnet that didn't have service endpoint configured, to the.networkAcls.virtualNetworkRules
property. The response is of status code 200, but the response body is as below:The request identifier is as below: