Azure / azure-sdk-for-rust

This repository is for active development of the *unofficial* Azure SDK for Rust. This repository is *not* supported by the Azure SDK team.
MIT License
680 stars 232 forks source link

KeyvaultClient Secret Client Hangs non-deterministically #1632

Closed Pieeer1 closed 3 months ago

Pieeer1 commented 3 months ago

When attempting to grab values from a KeyvaultClient, sometimes it will fully function and grab my values no problem. There are other times (seemingly random) that it will infinitely hang with no exception.

Here is the example:

 let keyvaultClient = match KeyvaultClient::new(&"https://zline-keyvault.vault.azure.net/", Arc::new(DefaultAzureCredential::default())){
        Ok(client) => {
            info!("Successfully instantiated Keyvault client");
            client
        }

This compiles just fine and logs the success message.

Later, attempting to call the following:

    match keyvaultClient.secret_client().get("my_secret").await{
        Ok(_) => info!("secret grabbed"),
        Err(e) => panic!("Failed to get secret: {}", e)
    }

Infinitely Hangs and does not retrieve the secret.

I am authenticated with az login and have attempted to get any sort of error message out of this thing. Any way that there is some issue here I am missing?

Pieeer1 commented 3 months ago

This was actually a result of using a mutex block. SDK is working fine!