Azure / Azure/azure-sdk-for-java

[QUERY] httpPipeline.sendSync in AzurePipelinesCredential clientAssertionSupplierWithHttpPipeline

Open
#46,858 2 comments 0 reactions 1 assignee Claimed by @g2vinay View on GitHub
Azure.Identity Client needs-team-attention
Dominant language
Java
Stars
2.6k
Forks
2.2k
Avg merge
2d 8h
Merged PRs (30d)
178

Description

**Query/Question**

In AzurePipelinesCredential, a `sendSync` is written for function `clientAssertionSupplierWithHttpPipeline`
https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzurePipelinesCredential.java#L73-L80

This `clientAssertionSupplierWithHttpPipeline` function can be invoked in async IdentityClient
https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClient.java#L144-L152
https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClientBase.java#L226-L228

Hence, this appears to be a sync I/O invocation in async stack.

***Why is this not a Bug or a feature Request?***

Not sure if my analysis is correct, not familiar with identity lib.

Example [Failure CI](https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5390519&view=logs&j=ef5331a3-ee94-52e2-0960-73d0e6e17ac0&t=8383e9bb-28e5-5969-3ede-e06edf1a0d73&l=208)
The test code invokes an async API (something of `createOrUpdateAsync`). And this is a first request to ARM, hence it need to get a token from identity lib.

**Setup (please complete the following information if applicable):**
- OS: [e.g. iOS]
- IDE: [e.g. IntelliJ]
- Library/Libraries: [e.g. com.azure:azure-identity 1.16.3

**Information Checklist**
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
- [x] Query Added
- [x] Setup information Added

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.