Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update LRO state machine across all languages #1128

Closed
markcowl opened this issue Jun 3, 2016 · 1 comment
Closed

Update LRO state machine across all languages #1128

markcowl opened this issue Jun 3, 2016 · 1 comment
Assignees

Comments

@markcowl
Copy link
Member

markcowl commented Jun 3, 2016

Description

According to ARM best practices, all LRO operations should work as follows:

  • If the original response contaisn both AzureAsyncOperation and Location headers, keep the Location header and follow through the AzureAsyncOperation pattern to a terminal state
    • After a terminal state is reached, if it is a success, follow the Location header in the success case and return the payload from the result
    • After a termina state failure, return the error contained in the AzureAsyncOperation header
    • if the operation is a PUT, preform a get on the original URI to return the completed object
  • If the originalresponse contains only an AzureAsyncOperation header, behave as now (follow azure async operation header to conclusion)
  • if the original response contains a Location header, follow the location header unbtil a terminal response code and lack of location header
  • If the operation is a PUT and neither Location nor AzureAsyncOperation exists, perform Get requests on the original URI until ProvisioningState is a termina state

Need to implement this pattern across languages, and add additional tests to ensure each of these branches are covered for success / failure / cancellation for all operation tyupes (PUT, POST, DELETE, PATCH)

This will also support the long-running POST operation for Network RP

Cost: 8

@markcowl markcowl changed the title Update LRO state machien acorss all RPs Update LRO state machine acorss all RPs Jun 3, 2016
@markcowl markcowl changed the title Update LRO state machine acorss all RPs Update LRO state machine across all languages Jun 3, 2016
@fearthecowboy fearthecowboy added this to the 1.0 milestone Jun 15, 2016
@djberg96
Copy link

@markcowl Is this best practice documented anywhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants