Skip to content

Conversation

@heaths
Copy link
Member

@heaths heaths commented Oct 11, 2025

Resolves #2757

@github-actions
Copy link

github-actions bot commented Oct 11, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

azure_core
azure_security_keyvault_certificates
typespec_client_core
typespec

Copy link
Member

@antkmsft antkmsft left a 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.

@heaths heaths force-pushed the issue2757 branch 2 times, most recently from afa31ed to 3296cbb Compare October 22, 2025 09:50
@heaths heaths marked this pull request as ready for review October 23, 2025 08:12
@heaths heaths requested review from a team and RickWinter as code owners October 23, 2025 08:12
Copilot AI review requested due to automatic review settings October 23, 2025 08:12
Copy link
Contributor

Copilot AI left a 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 IntoFuture implementation for Poller to enable await syntax
  • 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

@RickWinter
Copy link
Member

@heaths The doc comments should be made. Do you want to accept the recommendations or do you want to push updates from your branch?

@heaths
Copy link
Member Author

heaths commented Oct 24, 2025

@analogrelay @LarryOsterman I'm not too crazy about adding a function to Format, though it's convenient. I prototyped another way that effectively makes it an internal trait: #3259. Curious what you think. I would rather keep Format as a marker trait, but it's hard to ignore the convenience of adding a function to it. That said, another problem with the prototype is that it limits users to only Formats we define; though, I think that's reasonable in this case. /cc @RickWinter

@heaths heaths merged commit 2b496f0 into Azure:main Oct 24, 2025
17 checks passed
@github-project-automation github-project-automation bot moved this from Untriaged to Done in Azure SDK for Key Vault Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Azure.Core The azure_core crate KeyVault Key Vault

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Return final resource from Poller

4 participants