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

[Core] Improve OperationHelpers #18958

Closed
kinelski opened this issue Feb 23, 2021 · 1 comment · Fixed by #19105
Closed

[Core] Improve OperationHelpers #18958

kinelski opened this issue Feb 23, 2021 · 1 comment · Fixed by #19105
Assignees
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library.

Comments

@kinelski
Copy link
Member

kinelski commented Feb 23, 2021

Currently our OperationHelpers class doesn't do much, and Long-Running Operation classes in general are very repetitive. Most of the logic could be shared.

Goals

  • Move repetitive bits to the OperationHelpers class.
  • If possible, write OperationHelpers in a way that ensures thread-safety (related discussion).
  • Implement the polling in a way that:
    • The default polling time can be overwritten individually by each operation type.
    • The default polling time can be set to zero by our test framework to improve playback runs. If possible, avoid Reflection.
    • Look for the retry-after property returned by the service when deciding the next polling time.
  • Make sure all Track 2 data plane libraries with LROs make use of the new OperationHelpers whenever possible. All these libraries are exhaustively listed below.
  • Consider:
    • Keeping OperationHelpers as an extension class.
    • Making OperationHelpers as part of the Azure.Core library.
    • Implementing the OperationHelpers functionality as part of the abstract Operation<T> class.

Track 2 data plane libraries that make use of LROs

  • FormRecognizer
  • KeyVault.Administration
  • KeyVault.Certificates
  • KeyVault.Keys
  • KeyVault.Secrets
  • MixedReality.RemoteRendering
  • Storage.Blobs
  • Synapse.Spark
  • TextAnalytics

Suggestion: we can use the ArmOperationHelpers class used by the resource manager libraries as a reference. Their LROs seem to follow a stricter pattern than the ones used in data plane libraries, so it may be a bit harder on our side.

@kinelski kinelski added Client This issue points to a problem in the data-plane of the library. Azure.Core labels Feb 23, 2021
@kinelski kinelski self-assigned this Feb 23, 2021
@heaths
Copy link
Member

heaths commented Apr 26, 2021

+1 on checking the Retry-After header, which Key Vault does send and we're not using currently.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants