-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
docs(core): add an example of custom polling #29180
Conversation
We've been contact for several times regarding custom polling. So, it would be better we add an example in our document. |
API change check API changes are not detected in this pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious how broadly this approach has been agreed upon. We shouldn't provide a sample to the Azure.Core docs for something we don't recommend for all of Azure.Core.
@annelo-msft We have been contacted at least twice for customer cases (@m-nash and me respectively). The solution from SDK side is to customize the polling behavior. In my case(#29072), the But after discussion, we thought it might be better to let users fully control the polling since we cannot foresee all edge cases. |
- add a sample case in `OperationSamples` - add a section `Custom polling for completion of operation` in document resolve Azure#29072
Co-authored-by: Christopher Scott <chriscott@hotmail.com>
de9cdf4
to
1115fb8
Compare
Co-authored-by: Christopher Scott <chriscott@hotmail.com>
Co-authored-by: Christopher Scott <chriscott@hotmail.com>
Hi @archerzz. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days. |
Hi @archerzz. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing "/reopen" if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the "no-recent-activity" label; otherwise, this is likely to be closed again with the next cleanup pass. |
Hi, we are migrating from Track 1 to Track 2 SDK. I need to track a long running operation in an async manner using its operation Id. It would not be feasible to wait synchronously for the LRO to complete. So, we do not want to wait until completion (synchronously) and rather would need to jump to do other tasks meanwhile the LRO is going on and come back and be able to poll the operation status and act accordingly. We were able to do this in Track 1 SDK using https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/BackupOperationStatusesOperations.cs#L92 where the LRO status could be polled using its Operation Id. But similar functionality is not available in Track 2 SDK. This is a useful functionality and can this be addressed in Track 2 SDK? |
@nishanthm-msft are you doing this within the same process? If so you can store the ArmOperation objects you get back and periodically call If you are doing this across processes then yes you will need to send the |
@m-nash I am doing this across processes. So, the process which executes this operation is actually different from the one tracking it. Can you please share your thoughts on the below approach which I thought could serve the purpose. Can we pass the reference of the entire ArmOperation object itself as it is (instead of Id alone as rehydration isn't available yet) that we get back from the process executing this LRO to the calling process and then later poll the status of the LRO when required from the calling process itself using |
OperationSamples
Custom polling for completion of operation
in documentresolve #29072
Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.