-
Notifications
You must be signed in to change notification settings - Fork 318
Add Poller<T> for long-running operations (LROs) #2759
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
Conversation
|
I still need to implement the retry options (will likely mimic our This may be temporary until we implement #2757, though maybe still valid. This at least makes tests, examples, and doc examples easier to understand; otherwise, we'd have to add loops for everything and just ignore every intermediate status monitor. |
sdk/keyvault/azure_security_keyvault_certificates/tests/certificate_client.rs
Show resolved
Hide resolved
API Change CheckAPIView identified API level changes in this PR and created the following API reviews azure_core |
sdk/keyvault/azure_security_keyvault_certificates/src/generated/clients/certificate_client.rs
Outdated
Show resolved
Hide resolved
|
@heaths I have a working LRO (for ARM mgmt plane API) implementation, which naively port the azure-sdk-for-go to Rust: https://github.com/magodo/azure/tree/main/src/client, if you are interested in. |
|
@magodo I'm unable to access it. But I will say that, while I looked at Go's and other languages (I worked on the Azure SDK for .NET team previously), it's not a pattern I want for the Rust SDK. The pollers do too much at runtime that, because we are strictly TypeSpec-based, we can do at compile time. The current design here not only has a consistent code flow with our |
sdk/keyvault/azure_security_keyvault_certificates/src/models.rs
Outdated
Show resolved
Hide resolved
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.
The extension methods for the poller are ugly but necessary.
Resolves Azure#2756 and resolves Azure#2482
Also adds a `DEFAULT_POLICY` to Key Vault certificates similar to most other Azure SDK languages. This significantly simplifies examples.
Redefined as extension methods to avoid overwriting the generated code until the emitter has added support for Poller.
|
@microsoft-github-policy-service rerun |
|
/check-enforcer evaluate |
|
@microsoft-github-policy-service rerun |
|
/check-enforcer evaluate |
|
@microsoft-github-policy-service rerun |
|
/check-enforcer evaluate |
Resolves #2756 and resolves #2482