Azure / Azure/azure-sdk-for-rust

Need heuristic-based LRO helper for ARM crates

Open
#4,296 1 comment 1 reaction 2 assignees Claimed by @heaths View on GitHub
ARM ARM - Core Azure.Core Mgmt
Dominant language
Rust
Stars
884
Forks
365
Avg merge
2d 19h
Merged PRs (30d)
109

Description

LROs in ARM TypeSpecs don't always have all the information we need available to generate the right code for polling LROs. Instead, we should add support to `azure_core` only for ARM crates identified by the emitter to use that basically works like Go's:

* https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/azcore/runtime/poller.go - specifically the `NewPoller` functions ->
* https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/azcore/internal/pollers which, for ARM, uses
* async
* body
* loc

Python's is worth looking at as well: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-mgmt-core/azure/mgmt/core/polling/arm_polling.py

We could a new public `resource_manager` module under `azure_core::http::poller` that contains a function named `new_poller` that takes the type parameters and function parameters necessary to create a heuristic-based poller like the examples above (using functions in Rust as much as possible, instead of different structs with different implementations like in Go) and in [`CertificateClient::begin_create_certificate()`](https://github.com/Azure/azure-sdk-for-rust/blob/1f5abd74e6da08daed423d124d7aaf12dfcd0da3/sdk/keyvault/azure_security_keyvault_certificates/src/clients.rs#L149). It should also take an `Option` to support, among other things, continuation, as explained in [poller.rs](https://github.com/Azure/azure-sdk-for-rust/blob/main/sdk/core/azure_core/src/http/poller.rs).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.