-
Notifications
You must be signed in to change notification settings - Fork 320
Get final state from pollers #3183
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
API Change CheckAPIView identified API level changes in this PR and created the following API reviews azure_core |
antkmsft
left a comment
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.
This makes sense an at least looks worthy of a try, I think I should try to consume this from my codegen PR, integrate there, and see what we get, and if it looks good.
afa31ed to
3296cbb
Compare
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.
Pull Request Overview
This PR enhances long-running operation (LRO) polling by enabling pollers to automatically fetch and return the final resource state. Previously, pollers only returned status monitors; users needed to manually fetch the final resource. Now, pollers implement IntoFuture, allowing direct await to get the final result.
Key Changes
- Pollers now fetch and return the final model automatically upon successful completion
- Added
IntoFutureimplementation forPollerto enableawaitsyntax - Updated test files to remove manual fetching after polling completes
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/core/azure_core/src/http/poller.rs | Added IntoFuture implementation and PollerResult::Succeeded variant with target callback; added Format trait method and associated type to StatusMonitor |
| sdk/core/typespec_client_core/src/http/format.rs | Added deserialize method to Format trait for deserializing response bodies |
| sdk/core/typespec_client_core/src/http/response.rs | Added to_raw_response() method to create RawResponse from cloned data |
| sdk/keyvault/azure_security_keyvault_certificates/src/models.rs | Updated StatusMonitor implementation to include Format type and improved status parsing logic |
| sdk/keyvault/azure_security_keyvault_certificates/src/clients.rs | Added target fetching logic in begin_create_certificate and resume_certificate_operation to retrieve final certificate |
| sdk/keyvault/azure_security_keyvault_certificates/tests/certificate_client.rs | Simplified tests to use direct await instead of wait() followed by manual fetching |
| sdk/keyvault/azure_security_keyvault_certificates/README.md | Updated documentation examples to show simplified polling pattern |
| sdk/keyvault/azure_security_keyvault_certificates/CHANGELOG.md | Documented breaking change of removing wait() function |
| sdk/core/azure_core/examples/core_poller.rs | Added examples demonstrating both await and stream-based polling patterns |
| sdk/core/azure_core/examples/core_pager.rs | Added PageIterator example and documentation improvements |
| sdk/core/azure_core/src/http/pager.rs | Added comprehensive documentation with usage examples |
| sdk/core/azure_core/README.md | Updated LRO example to show simplified polling pattern |
| sdk/core/azure_core/CHANGELOG.md | Documented breaking changes and new features |
| sdk/keyvault/assets.json | Updated test assets tag |
|
@heaths The doc comments should be made. Do you want to accept the recommendations or do you want to push updates from your branch? |
sdk/keyvault/azure_security_keyvault_certificates/src/clients.rs
Outdated
Show resolved
Hide resolved
|
@analogrelay @LarryOsterman I'm not too crazy about adding a function to |
Resolves #2757