Skip to content

Conversation

@heaths
Copy link
Member

@heaths heaths commented Jul 3, 2025

Resolves #2756 and resolves #2482

@github-actions github-actions bot added the Azure.Core The azure_core crate label Jul 3, 2025
@heaths
Copy link
Member Author

heaths commented Jul 3, 2025

I still need to implement the retry options (will likely mimic our RetryOptions for the RetryPolicy) but I wanted to get feedback on the DX here. Since implementing IntoFuture for #2757 is on the backlog and would return the StatusMonitor::Output, I took a page from other uses of wait() in both std::process::Command::wait() and tokio::process::Command::wait() and return a future that will just pump the Stream implementation until terminal state and return the last status monitor.

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.

@github-actions
Copy link

github-actions bot commented Jul 4, 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

@magodo
Copy link
Contributor

magodo commented Jul 8, 2025

@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.

@heaths
Copy link
Member Author

heaths commented Jul 8, 2025

@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 Pager, but makes it easy to also get the final object in a subsequent IntoFuture implementation.

@heaths heaths marked this pull request as ready for review July 8, 2025 22:14
@LarryOsterman LarryOsterman self-requested a review July 9, 2025 22:05
Copy link
Member

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

heaths added 5 commits July 9, 2025 15:21
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.
@heaths heaths requested a review from antkmsft July 9, 2025 22:23
@heaths
Copy link
Member Author

heaths commented Jul 9, 2025

@microsoft-github-policy-service rerun

@heaths
Copy link
Member Author

heaths commented Jul 9, 2025

/check-enforcer evaluate

@heaths
Copy link
Member Author

heaths commented Jul 10, 2025

@microsoft-github-policy-service rerun

@LarryOsterman
Copy link
Member

/check-enforcer evaluate

@heaths
Copy link
Member Author

heaths commented Jul 10, 2025

@microsoft-github-policy-service rerun

@Azure Azure deleted a comment from chlowell Jul 10, 2025
@heaths
Copy link
Member Author

heaths commented Jul 10, 2025

/check-enforcer evaluate

@heaths heaths merged commit 62600f3 into Azure:main Jul 10, 2025
17 checks passed
@heaths heaths deleted the issue2458 branch July 10, 2025 16:57
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Stream to return/refresh status monitor until a terminal state Only LRO (poller) status should use case-insensitive deserialization

6 participants