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

Should poll long running operation when the first response is 200 #610

Closed
isra-fel opened this issue Jun 12, 2020 · 1 comment · Fixed by #713
Closed

Should poll long running operation when the first response is 200 #610

isra-fel opened this issue Jun 12, 2020 · 1 comment · Fixed by #713
Assignees
Labels

Comments

@isra-fel
Copy link
Member

isra-fel commented Jun 12, 2020

Current behavior

When requesting a long running operation (LRO), if the response is 200 OK, generated code will not start polling. For example:

https://github.com/Azure/azure-powershell/blob/58ca05dc9185895a19c6cedbb92c5e54546daa8a/src/Databricks/generated/api/Databricks.cs#L1204

This may cause some cmdlets to return early with the resource not fully provisioned.

Expected behavior

The cmdlet should start polling until the resource has successfully been provisioned.

@isra-fel
Copy link
Member Author

isra-fel commented Nov 11, 2020

According to https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#creatingupdating-using-put
If the request is a PUT we should expect a 201 Created or 200 OK, otherwise it should be 202 Accepted.
But now we are just expecting 201 and 202 for all HTTP methods. We'll need to re-design the logic.

  • Option 1: Simply start polling if the response is 200/201/202
  • Option 2: Different logic for different HTTP methods

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

Successfully merging a pull request may close this issue.

1 participant