text:
Feature/datamap tsp

Data Plane API - Pull Request

API Info: The Basics
Most of the information about your service should be captured in the issue that serves as your API Spec engagement record.

Link to API Spec engagement record issue:

Is this review for (select one):

[ ] a private preview
[ ] a public preview
[ ] GA release

Change Scope
This section will help us focus on the specific parts of your API that are new or have been modified. Please share a link to the design document for the new APIs, a link to the previous API Spec document (if applicable), and the root paths that have been updated.

Design Document:
Previous API Spec Doc:
Updated paths:

Viewing API changes
For convenient view of the API changes made by this PR, refer to the URLs provided in the table
in the Generated ApiView comment added to this PR. You can use ApiView to show API versions diff.
Suppressing failures
If one or multiple validation error/warning suppression(s) is detected in your PR, please follow the
Swagger-Suppression-Process
to get approval.
❔Got questions? Need additional info?? We are here to help!

 Contact us!
The Azure API Review Board is dedicated to helping you create amazing APIs. You can read about our mission and learn more about our process on our wiki.

💬 Teams Channel
💌 email

Click here for links to tools, specs, guidelines & other good stuff
Tooling

Open API validation tools were run on this PR. Go here to see how to fix errors
Spectral Linting
Open API Hub

Guidelines & Specifications

Azure REST API Guidelines
OpenAPI Style Guidelines
Azure Breaking Change Policy

Helpful Links

Azure DevTools Wiki

@MaryGao is this a know JS script issue?
03:54:45.622 cmdout 	[automation_generate.sh] Generate some other files for @azure-rest/azure-analytics-purview-datamap-rest in /mnt/vss/_work/1/s/azure-sdk-for-js/sdk/azure.analytics.purview.datamap/azure-analytics-purview-datamap-rest...
03:54:45.634 cmderr 	[automation_generate.sh] [ERROR] Error:
03:54:45.634 cmderr 	[automation_generate.sh] [ERROR] An error occurred while run build for typespec project: "specification/purview/Azure.Analytics.Purview.DataMap":
03:54:45.634 cmderr 	[automation_generate.sh] [ERROR] Err: Wrong package path /mnt/vss/_work/1/s/azure-sdk-for-js/sdk/azure.analytics.purview.datamap/azure-analytics-purview-datamap-rest;
03:54:45.634 cmderr 	[automation_generate.sh] [ERROR] Stderr: "undefined"
03:54:45.634 cmderr 	[automation_generate.sh] [ERROR] Stdout: "undefined"
03:54:45.634 cmderr 	[automation_generate.sh] [ERROR] ErrorStack: "undefined"
03:54:45.635 cmderr 	[automation_generate.sh] [ERROR] Cannot read properties of undefined (reading 'module')
03:54:45.641 error C 	Script return with result [failed] code [1] signal [null] cwd [azure-sdk-for-js]: sh .scripts/automation_generate.sh

@chunyu3 , can you have a look at dotnet sdk generation failure? Can you comment if it's a spec issue?

/azp run

/azp run

Hi  @MaryGao , @raych1 , please help check why the sdk generation pipeline fails.
For the breaking changes, it was a model error we discovered when migrating from openAPI to typeSpec. (No SDK has been released for this version)
Please help review the PR. Thanks.

Hi @MaryGao , @raych1 , please help check why the sdk generation pipeline fails. For the breaking changes, it was a model error we discovered when migrating from openAPI to typeSpec. (No SDK has been released for this version) Please help review the PR. Thanks.

@MaryGao JS package was generated but failed to build.

/azp run

/azp run

/azp run

/azp run

/azp run

Issues: https://github.com/Azure/azure-sdk-pr/issues/1668

/azp run

There are two concerns with this PR:

Azure's versioning policy requires that any change to a GA API version be made in a new api-version. Things like changing parameter names (except path parameters) or making required parameters optional must be done in a new API version.
Some of the changes being made appear to be breaking changes from a prior GA, and these must be avoided if at all possible.

Hi @mikekistler, thanks for the response.
All the changes are related to renaming in SDK models. No changes have been done in service API behavior. The purpose for this PR is to migrate to TypeSpec to release SDKs for the existing GA API version (No SDK released yet for 2023-09-01). According to the SDK review comments, we updated some parameter names in TypeSpec and changed the samples accordingly. However, as the previous purviewdatamap.json was using the same set of examples to do the model validation, we have to update the existing swagger file to pass the model validation error, thus causing the breaking changes.
We did not remove/add any parameters, nor did we change the optional setting for any parameters. All the changes are related to renaming. Below are the justifications we have for those breaking changes. Please help review the breaking changes justifications and provide some suggestions. Many thanks.

We rename the path parameter name from xxxGuid to xxxId for categoryGuid/glossaryGuid/operationGuid/termGuid [This cause the errors for 1007-RemoveClientParameter and 1038-AddedPath]

for example: /atlas/v2/glossary/term/{termId}

We rename the request body parameter to "body" instead of different model names. [This cause the errors for 1009 - RemovedRequiredParameter / 1010 - AddingRequiredParameter/ 1043 - AddingOptionalParameter /1046 - RemovedOptionalParameter]

We use enum "ENUM,ENTITY,CLASSIFICATION,RELATIONSHIP,STRUCT/etc" instead of "enum, entity, classification/etc" The service side is case-insensitive. We update to capital letters to align with the model TypeCategory. [This cause the errors for 1019 - RemovedEnumValue/1020 - AddedEnumValue ]

For 1038 - AddedPath, there are some false alarming. These paths exist in both purviewdatamap.json and openapi.json

For 1026-TypeChanged, this is a bug we found in previous swagger when we try to migrate to typeSpec

Here is the feedback we received from previous SDK review meeting. Azure SDK Review - [Introduction to Microsoft Purview] · Issue #1668 · Azure/azure-sdk-pr (github.com)

For the rest of the linkDiff warning, there are Atlas API format which we need to keep compatible.

hello @yifan-zhou922 The build failure in azure-sdk-for-net ci because it break csharp sdk Analyzer. You can ask archboard review and approve this, then suppress the ruler. otherwise, you need to customize for csharp.

Need archboard Review & Approve for the azure-sdk-for-net ci failure.
1# We need the approval to keep the model names which end with "Options". These naming suggestions come from the SDK review meeting, but cause the failures to auto generate.net APIView.
AutoCompleteOptions.cs(13,26): error AZC0030: Model name 'AutoCompleteOptions' ends with 'Options'. Suggest to rename it to 'AutoCompleteConfig' or any other appropriate name.
ClassificationAssociateOptions.cs(14,26): error AZC0030: Model name 'ClassificationAssociateOptions' ends with 'Options'. Suggest to rename it to 'ClassificationAssociateConfig' or any other appropriate name.
MoveEntitiesOptions.cs(14,26): error AZC0030: Model name 'MoveEntitiesOptions' ends with 'Options'. Suggest to rename it to 'MoveEntitiesConfig' or any other appropriate name.
/QueryOptions.cs(15,26): error AZC0030: Model name 'QueryOptions' ends with 'Options'. Suggest to rename it to 'QueryConfig' or any other appropriate name.
SuggestOptions.cs(13,26): error AZC0030: Model name 'SuggestOptions' ends with 'Options'. Suggest to rename it to 'SuggestConfig' or any other appropriate name.
2# We name several operation groups like Discovery/Entity/Relationship/Lineage/etc. This also causes the build failures. However, these issues do not exist in other languages
Generated/Discovery.cs(19,26): error AZC0012: Single word class names are too generic and have high chance of collision with BCL types or types from other libraries
Generated/Entity.cs(21,26): error AZC0012: Single word class names are too generic and have high chance of collision with BCL types or types from other libraries
/Glossary.cs(21,26): error AZC0012: Single word class names are too generic and have high chance of collision with BCL types or types from other libraries
Lineage.cs(19,26): error AZC0012: Single word class names are too generic and have high chance of collision with BCL types or types from other libraries
Relationship.cs(19,26): error AZC0012: Single word class names are too generic and have high chance of collision with BCL types or types from other libraries
Please help approve/suppress the analyzer rule or suggest the way to avoid the issue.

hello @yifan-zhou922 The build failure in azure-sdk-for-net ci because it break csharp sdk Analyzer. You can ask archboard review and approve this, then suppress the ruler. otherwise, you need to customize for csharp.

Thanks @chunyu3 , do you know who should I @ for the approval? Previously, according to @KrzysztofCwalina 's suggestion, the static anaylzer should not be complaining about the type names. And, I have also filed a bug https://github.com/Azure/azure-sdk-tools/issues/7589 as suggested.

/azp run

/azp run

/azp run

/azp run

UPDATES:
For the above issues which causing the .net generation pipeline failures, we rename the modes to xxxConfig as recommended. And we rename our operation group names to EntityOperations/DiscoveryOperations/etc to avoid the AZC0012 error.

UPDATES:
For the above issues which causing the .net generation pipeline failures, we rename the modes to xxxConfig as recommended. And we rename our operation group names to EntityOperations/DiscoveryOperations/etc to avoid the AZC0012 error.

In our previous GA swagger, several Atlas APIs do not require api-version as the required parameter.
Updated in the routes.tsp to align with the previous GA document. Only selected APIs api-version as required parameters. Others will treat api-version as the optional paramter.

/azp run

/azp run

/azp run

Because of the issue for csharp generator which in mentioned here https://github.com/Azure/autorest.csharp/issues/4189,
we will use int64 instead of utcDateTime in this TypeSpec migration.

/azp run

Because of the issue for csharp generator which in mentioned here Azure/autorest.csharp#4189, we will use int64 instead of utcDateTime in this TypeSpec migration.

@yifan-zhou922: If you can wait, it would be nice to see if autorest.csharp can hotfix this quickly, so you don't need to workaround this in your spec.

Because of the issue for csharp generator which in mentioned here Azure/autorest.csharp#4189, we will use int64 instead of utcDateTime in this TypeSpec migration.

Encoding unixTimestamp is intended to represent seconds since epoch, not milliseconds.  Please see discussion here:
https://github.com/microsoft/typespec/issues/2887
Longer-term, it sounds like we might add a dedicated type for this to TypeSpec.  Until then, we recommend modeling this as a safeint instead of an int64, since safeint is more compatible and large enough to hold very large dates.

Thanks for the comments. Updated to safeint.

Posting the comments related to the CI failures here since they've gotten lost in the long thread of this PR:

Python failures are due to an emitter issue that @msyyc is tracking here: https://github.com/Azure/typespec-azure/issues/215
.NET issues are due to some naming issues that need to be resolved in the .NET repo when merging in the SDK, related comments with a link to some historical comments about this issue from @yifan-zhou922 (cc @chunyu3 ):

For operation group name (AZC0012), we want to add a suppression rule like this when releasing the SDK. Prefer not to block this PR just for this failure. Leo Lie: azure-sdk-for-net-track2: How to suppress AZC0012: Single word class names?
posted in Azure SDK / Service API Toolset on 2023年11月15日 04:19

/pr RequestMerge


text:
Add ResourceNavigationLinks list on subnets

Add ResourceNavigationLinks list on subnets

Hi @AhmedSalama-MS, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

It looks like you're working at Microsoft (ahsalam). If you're full-time, we DON'T require a contribution license agreement.

If you are a vendor, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;

@AhmedSalama-MS - Please address the code review comments.

LGTM with Amar s comments

No modification for NodeJS

 https://github.com/Azure/azure-sdk-for-ruby/pull/411

 https://github.com/Azure/azure-sdk-for-python/pull/735

source: gharchive/pull-request

authors: AhmedSalama-MS AutorestCI DeepakRajendranMsft amarzavery azurecla

repo: Azure/azure-rest-api-specs

license: MIT

license_type: permissive

license_source: github-api


text:
FI from master

Latest improvements:
MSFT employees can try out our new experience at OpenAPI Hub  - one location for using our validation tools and finding your workflow.

Contribution checklist:

[ ] I have reviewed the documentation for the workflow.
[ ] Validation tools were run on swagger spec(s) and have all been fixed in this PR.
[ ] The OpenAPI Hub was used for checking validation status and next steps.

ARM API Review Checklist

[ ] Service team MUST add the "WaitForARMFeedback" label if the management plane API changes fall into one of the below categories.
adding/removing APIs.
adding/removing properties.
adding/removing API-version.
adding a new service in Azure.

Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.

[ ] If you are blocked on ARM review and want to get the PR merged urgently, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
Please follow the link to find more details on API review process.

Automation for azure-sdk-for-python

Automation for azure-sdk-for-java

Automation for azure-sdk-for-node

Automation for azure-sdk-for-go

Automation for azure-sdk-for-ruby

Automation for azure-sdk-for-js

Can one of the admins verify this patch?

authors: AutorestCI azuresdkci sergey-shandar


text:
Arm common types

Latest improvements:
MSFT employees can try out our new experience at OpenAPI Hub  - one location for using our validation tools and finding your workflow.

Contribution checklist:

[ ] I have reviewed the documentation for the workflow.
[ ] Validation tools were run on swagger spec(s) and have all been fixed in this PR.
[ ] The OpenAPI Hub was used for checking validation status and next steps.

ARM API Review Checklist

[ ] Service team MUST add the "WaitForARMFeedback" label if the management plane API changes fall into one of the below categories.
adding/removing APIs.
adding/removing properties.
adding/removing API-version.
adding a new service in Azure.

Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.

[ ] If you are blocked on ARM review and want to get the PR merged urgently, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
Please follow the link to find more details on API review process.

This PR is adding a new object "locationData" in the common-types definition file. This is an optional property that can be used by multiple RPs by reference.

Automation for azure-sdk-for-go

Automation for azure-sdk-for-python

Please fix CI error.

Can one of the admins verify this patch?

/azp run automation - sdk

@KrisBash,  I saw there is still an issue reported by Prettier check, could you follow the guide in  https://aka.ms/AA6h31t to fix the issue?

authors: AutorestCI KrisBash azuresdkci fengzhou-msft lirenhe


text:
Fix a bug in swagger

Latest improvements:
MSFT employees can try out our new experience at OpenAPI Hub  - one location for using our validation tools and finding your workflow.

Contribution checklist:

[x] I have reviewed the documentation for the workflow.
[x] Validation tools were run on swagger spec(s) and have all been fixed in this PR.
[x] The OpenAPI Hub was used for checking validation status and next steps.

ARM API Review Checklist

[ ] Service team MUST add the "WaitForARMFeedback" label if the management plane API changes fall into one of the below categories.
adding/removing APIs.
adding/removing properties.
adding/removing API-version.
adding a new service in Azure.

Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.

[ ] If you are blocked on ARM review and want to get the PR merged urgently, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
Please follow the link to find more details on API review process.

/azp run automation - sdk

Can one of the admins verify this patch?

@yungezz - We have not released this version of API as  yet to public. Nor any of the SDK's have been generated using this version. It should be safe to check-in the change.

@yungezz - We have not released this version of API as yet to public. Nor any of the SDK's have been generated using this version. It should be safe to check-in the change.

thanks for confirmation. will merge it then.

authors: AutorestCI azuresdkci nachakra yungezz


text:
Redesign JSON builder APIs and add validation.

Please focus on reviewing the az_json_builder.c changes (along with the  corresponding az_json.h API and documentation changes).
Changes:

Added validation to make sure users cannot unknowingly build invalid JSON.

This can move to precondition checks to reduce overhead since the intent is to catch dev time bugs.

Modified the API to avoid reliance on building az_json_token and added append_container_end API so callers don't have to think about array vs. object.
Make sure strings that the user passes to the APIs are properly escaped according to the JSON RFC.
Updated documentation.
Updated the token kind enum and included a NONE, which is the initial value where no token is written.
Moved the "stack" logic into a single place for easy debugging (az_json_private.h), following single responsibility.

TODO (in subsequent PRs):

[ ] Support for non-contiguous buffers
[ ] Add more unit tests, including negative testing.
[ ] Remove az_json_pointer.
[ ] Post-preview: Decide whether we want to add support for writing an existing JSON within an az_span, raw, without any validation.
[ ] Post-preview: Decide whether we want support for writing formatted JSON or otherwise if we should remove the options.
[ ] Post-preview: Add base64 encoding support for adding byte arrays.

/check-enforcer reset

/check-enforcer evaluate

/check-enforcer evaluate

FYI, responding to comments/threads within a bulk PR review breaks threading and ordering of things. It also displays the comment twice. I suggest avoiding responding to GitHub conversation threads while doing a bulk review of a PR, and come back later to respond to threaded conversations after you are done with the review.

authors: ahsonkhan danewalton

repo: Azure/azure-sdk-for-c


text:
Throw cmake error when setting MOCK ON without gcc

fixes: https://github.com/Azure/azure-sdk-for-c/issues/912

Tested on Windows:
CMake Error at CMakeLists.txt:111 (message):
  Unsupported Compiler Option.

  Option `UNIT_TESTING_MOCK` is not supported on MSVC.  It is only supported
  by GNU gcc.

  Remove option `UNIT_TESTING_MOCK` to build tests without using MOCK


text:
Remove exposing windows.h header from our public headers and reduce risk of introducing it in non-public headers

Fixes https://github.com/Azure/azure-sdk-for-cpp/issues/1853

@Jinming-Hu can you help me figure out where the missing windows.h header errors in CI that are coming from in storage? If I just compile core, locally, things build fine.

@Jinming-Hu can you help me figure out where the missing windows.h header errors in CI that are coming from in storage? If I just compile core, locally, things build fine.
I don't know which file needs the header added explicitly.

HINTERNET in win_http_transport.hpp

authors: Jinming-Hu ahsonkhan

repo: Azure/azure-sdk-for-cpp


text:
Optional fields which were mandatory earlier creating failure with older service version

[ ] The purpose of this PR is explained in this or a referenced issue.
[x] The PR does not update generated files.

These files are managed by the codegen framework at Azure/autorest.go.

[x] Tests are included and/or updated for code changes.
[ ] Updates to module CHANGELOG.md are included.
[ ] MIT license headers are included in each file.

Please add an entry to CHANGELOG.md as part of this fix.

authors: RickWinter tanyasethi-msft

repo: Azure/azure-sdk-for-go


text:
[QUERY] Provider com.bea.xml.stream.MXParserFactory not found When initiating ClientCertificateCredential

Query/Question
I seem to be having similar issues to #6313
I'm developing a storage plugin for Rundeck and trying to use the azure-identity and azure-keyvault-secrets sdk
I'm getting the following errors
Caused by: javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.MXParserFactory not found
        at javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:72) ~[?:?]
        at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:178) ~[?:?]
        at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:92) ~[?:?]
        at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:136) ~[?:?]
        at com.fasterxml.jackson.dataformat.xml.XmlFactory.<init>(XmlFactory.java:113) ~[?:?]
        at com.fasterxml.jackson.dataformat.xml.XmlFactory.<init>(XmlFactory.java:100) ~[?:?]
        at com.fasterxml.jackson.dataformat.xml.XmlFactory.<init>(XmlFactory.java:84) ~[?:?]
        at com.fasterxml.jackson.dataformat.xml.XmlMapper.<init>(XmlMapper.java:122) ~[?:?]
        at com.azure.core.util.serializer.JacksonAdapter.<init>(JacksonAdapter.java:76) ~[?:?]
        at com.azure.core.util.serializer.JacksonAdapter.createDefaultSerializerAdapter(JacksonAdapter.java:112) ~[?:?]
        at com.azure.identity.implementation.IdentityClient.<clinit>(IdentityClient.java:89) ~[?:?]
        at com.azure.identity.implementation.IdentityClientBuilder.build(IdentityClientBuilder.java:99) ~[?:?]
        at com.azure.identity.ClientCertificateCredential.<init>(ClientCertificateCredential.java:50) ~[?:?]
        at com.azure.identity.ClientCertificateCredentialBuilder.build(ClientCertificateCredentialBuilder.java:79) ~[?:?]

My gradle config
dependencies {
    compile 'org.rundeck:rundeck-storage-api:3.3.3-20200910'
    compile "org.rundeck:rundeck-core:3.3.3-20200910"
    pluginLibs group: "com.azure", name: "azure-identity", version: "1.1.2"
    pluginLibs group: "com.azure", name: "azure-security-keyvault-secrets", version: "4.2.1"
    pluginLibs group: "org.apache.logging.log4j", name: "log4j-slf4j-impl", version: "2.0"
    pluginLibs group: "com.fasterxml.jackson.dataformat", name: "jackson-dataformat-xml", version: "2.11.2"
    pluginLibs group: "com.fasterxml.jackson.core", name: "jackson-databind", version: "2.11.2"
    runtime group: 'org.slf4j', name: 'slf4j-api', version: '1.7.30'
}

And my dependency tree
+--- org.rundeck:rundeck-storage-api:3.3.3-20200910
+--- org.rundeck:rundeck-core:3.3.3-20200910
|    +--- org.rundeck:rundeck-storage-api:3.3.3-20200910
|    +--- org.rundeck:rundeck-storage-conf:3.3.3-20200910
|    |    \--- org.rundeck:rundeck-storage-data:3.3.3-20200910
|    |         \--- org.rundeck:rundeck-storage-api:3.3.3-20200910
|    +--- org.rundeck:rundeck-authz-api:3.3.3-20200910
|    +--- org.rundeck:rundeck-authz-core:3.3.3-20200910
|    |    \--- org.rundeck:rundeck-authz-api:3.3.3-20200910
|    +--- org.rundeck:rundeck-authz-yaml:3.3.3-20200910
|    |    +--- org.rundeck:rundeck-authz-api:3.3.3-20200910
|    |    +--- org.rundeck:rundeck-authz-core:3.3.3-20200910 (*)
|    |    \--- org.yaml:snakeyaml:1.26
|    +--- com.google.guava:guava:24.1.1-jre
|    |    +--- com.google.code.findbugs:jsr305:1.3.9
|    |    +--- org.checkerframework:checker-compat-qual:2.0.0
|    |    +--- com.google.errorprone:error_prone_annotations:2.1.3
|    |    +--- com.google.j2objc:j2objc-annotations:1.1
|    |    \--- org.codehaus.mojo:animal-sniffer-annotations:1.14
|    +--- org.apache.ant:ant:1.9.15
|    |    \--- org.apache.ant:ant-launcher:1.9.15
|    +--- org.slf4j:slf4j-api:1.7.30
|    +--- commons-codec:commons-codec:1.11
|    +--- commons-beanutils:commons-beanutils:1.9.4
|    |    +--- commons-logging:commons-logging:1.2
|    |    \--- commons-collections:commons-collections:3.2.2
|    +--- commons-collections:commons-collections:3.2.2
|    +--- commons-lang:commons-lang:2.6
|    +--- org.dom4j:dom4j:2.1.3
|    |    +--- jaxen:jaxen:1.1.6
|    |    +--- javax.xml.stream:stax-api:1.0-2
|    |    +--- net.java.dev.msv:xsdlib:2013.6.1
|    |    |    \--- relaxngDatatype:relaxngDatatype:20020414
|    |    +--- javax.xml.bind:jaxb-api:2.2.12
|    |    +--- pull-parser:pull-parser:2
|    |    \--- xpp3:xpp3:1.1.4c
|    +--- jaxen:jaxen:1.1.6
|    +--- commons-cli:commons-cli:1.0
|    |    +--- commons-logging:commons-logging:1.0 -> 1.2
|    |    \--- commons-lang:commons-lang:1.0 -> 2.6
|    +--- org.apache.ant:ant-jsch:1.9.15
|    |    +--- org.apache.ant:ant:1.9.15 (*)
|    |    \--- com.jcraft:jsch:0.1.55
|    +--- com.jcraft:jsch:0.1.55
|    +--- com.jcraft:jsch.agentproxy.jsch:0.0.9
|    |    +--- com.jcraft:jsch:0.1.49 -> 0.1.55
|    |    \--- com.jcraft:jsch.agentproxy.core:0.0.9
|    +--- com.jcraft:jsch.agentproxy.sshagent:0.0.9
|    |    \--- com.jcraft:jsch.agentproxy.core:0.0.9
|    +--- com.jcraft:jsch.agentproxy.usocket-jna:0.0.9
|    |    +--- com.jcraft:jsch.agentproxy.core:0.0.9
|    |    +--- net.java.dev.jna:jna:4.1.0 -> 5.5.0
|    |    \--- net.java.dev.jna:jna-platform:4.1.0 -> 5.5.0
|    |         \--- net.java.dev.jna:jna:5.5.0
|    +--- com.jcraft:jsch.agentproxy.usocket-nc:0.0.9
|    |    \--- com.jcraft:jsch.agentproxy.core:0.0.9
|    +--- com.jcraft:jsch.agentproxy.connector-factory:0.0.9
|    |    +--- com.jcraft:jsch.agentproxy.core:0.0.9
|    |    +--- com.jcraft:jsch.agentproxy.usocket-jna:0.0.9 (*)
|    |    +--- com.jcraft:jsch.agentproxy.usocket-nc:0.0.9 (*)
|    |    +--- com.jcraft:jsch.agentproxy.sshagent:0.0.9 (*)
|    |    \--- com.jcraft:jsch.agentproxy.pageant:0.0.9
|    |         +--- com.jcraft:jsch.agentproxy.core:0.0.9
|    |         +--- net.java.dev.jna:jna:4.1.0 -> 5.5.0
|    |         \--- net.java.dev.jna:jna-platform:4.1.0 -> 5.5.0 (*)
|    +--- com.jcraft:jsch.agentproxy.core:0.0.9
|    +--- com.fasterxml.jackson.core:jackson-databind:2.10.1 -> 2.11.2
|    |    +--- com.fasterxml.jackson.core:jackson-annotations:2.11.2
|    |    \--- com.fasterxml.jackson.core:jackson-core:2.11.2
|    +--- org.yaml:snakeyaml:1.26
|    +--- com.squareup.retrofit2:retrofit:2.7.2
|    |    \--- com.squareup.okhttp3:okhttp:3.14.7
|    |         \--- com.squareup.okio:okio:1.17.2
|    +--- com.squareup.retrofit2:converter-jackson:2.7.2
|    |    +--- com.squareup.retrofit2:retrofit:2.7.2 (*)
|    |    \--- com.fasterxml.jackson.core:jackson-databind:2.10.1 -> 2.11.2 (*)
|    +--- javax.servlet:javax.servlet-api:4.0.1
|    \--- commons-httpclient:commons-httpclient:3.1
|         +--- commons-logging:commons-logging:1.0.4 -> 1.2
|         \--- commons-codec:commons-codec:1.2 -> 1.11
+--- com.azure:azure-identity:1.1.2
|    +--- com.azure:azure-core:1.8.1
|    |    +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.2
|    |    |    +--- com.fasterxml.jackson.core:jackson-annotations:2.11.2
|    |    |    +--- com.fasterxml.jackson.core:jackson-core:2.11.2
|    |    |    \--- com.fasterxml.jackson.core:jackson-databind:2.11.2 (*)
|    |    +--- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.11.2
|    |    |    +--- com.fasterxml.jackson.core:jackson-core:2.11.2
|    |    |    +--- com.fasterxml.jackson.core:jackson-annotations:2.11.2
|    |    |    +--- com.fasterxml.jackson.core:jackson-databind:2.11.2 (*)
|    |    |    +--- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.11.2
|    |    |    |    +--- com.fasterxml.jackson.core:jackson-annotations:2.11.2
|    |    |    |    +--- com.fasterxml.jackson.core:jackson-core:2.11.2
|    |    |    |    +--- com.fasterxml.jackson.core:jackson-databind:2.11.2 (*)
|    |    |    |    +--- jakarta.xml.bind:jakarta.xml.bind-api:2.3.2
|    |    |    |    |    \--- jakarta.activation:jakarta.activation-api:1.2.1
|    |    |    |    \--- jakarta.activation:jakarta.activation-api:1.2.1
|    |    |    +--- org.codehaus.woodstox:stax2-api:4.2.1
|    |    |    \--- com.fasterxml.woodstox:woodstox-core:6.2.1
|    |    |         \--- org.codehaus.woodstox:stax2-api:4.2.1
|    |    +--- org.slf4j:slf4j-api:1.7.30
|    |    +--- io.projectreactor:reactor-core:3.3.9.RELEASE
|    |    |    \--- org.reactivestreams:reactive-streams:1.0.3
|    |    \--- io.netty:netty-tcnative-boringssl-static:2.0.31.Final
|    +--- com.microsoft.azure:msal4j:1.6.2
|    |    +--- com.nimbusds:oauth2-oidc-sdk:7.4
|    |    |    +--- com.github.stephenc.jcip:jcip-annotations:1.0-1
|    |    |    +--- com.nimbusds:content-type:2.0
|    |    |    +--- net.minidev:json-smart:[1.3.1,2.3] -> 2.3
|    |    |    |    \--- net.minidev:accessors-smart:1.2
|    |    |    |         \--- org.ow2.asm:asm:5.0.4
|    |    |    +--- com.nimbusds:lang-tag:1.4.4
|    |    |    +--- com.nimbusds:nimbus-jose-jwt:8.14.1
|    |    |    |    +--- com.github.stephenc.jcip:jcip-annotations:1.0-1
|    |    |    |    \--- net.minidev:json-smart:[1.3.1,2.3] -> 2.3 (*)
|    |    |    \--- com.sun.mail:javax.mail:1.6.1
|    |    |         \--- javax.activation:activation:1.1
|    |    +--- org.slf4j:slf4j-api:1.7.28 -> 1.7.30
|    |    \--- com.fasterxml.jackson.core:jackson-databind:2.10.1 -> 2.11.2 (*)
|    +--- com.microsoft.azure:msal4j-persistence-extension:1.0.0
|    |    +--- com.microsoft.azure:msal4j:1.4.0 -> 1.6.2 (*)
|    |    +--- net.java.dev.jna:jna:5.5.0
|    |    +--- net.java.dev.jna:jna-platform:5.5.0 (*)
|    |    \--- org.slf4j:slf4j-api:1.7.7 -> 1.7.30
|    +--- com.nimbusds:oauth2-oidc-sdk:7.1.1 -> 7.4 (*)
|    +--- org.nanohttpd:nanohttpd:2.3.1
|    +--- net.java.dev.jna:jna-platform:5.4.0 -> 5.5.0 (*)
|    \--- org.linguafranca.pwdb:KeePassJava2:2.1.4
|         +--- org.linguafranca.pwdb:KeePassJava2-kdb:2.1.4
|         |    +--- org.linguafranca.pwdb:database:2.1.4
|         |    |    +--- org.jetbrains:annotations:15.0
|         |    |    +--- com.google.guava:guava:19.0 -> 24.1.1-jre (*)
|         |    |    \--- com.madgag.spongycastle:core:1.54.0.0
|         |    \--- org.jetbrains:annotations:15.0
|         +--- org.linguafranca.pwdb:KeePassJava2-dom:2.1.4
|         |    \--- org.linguafranca.pwdb:KeePassJava2-kdbx:2.1.4
|         |         +--- org.linguafranca.pwdb:database:2.1.4 (*)
|         |         +--- commons-codec:commons-codec:1.10 -> 1.11
|         |         \--- org.jetbrains:annotations:15.0
|         +--- org.linguafranca.pwdb:KeePassJava2-jaxb:2.1.4
|         |    \--- org.linguafranca.pwdb:KeePassJava2-kdbx:2.1.4 (*)
|         \--- org.linguafranca.pwdb:KeePassJava2-simple:2.1.4
|              +--- org.linguafranca.pwdb:KeePassJava2-kdbx:2.1.4 (*)
|              +--- org.simpleframework:simple-xml:2.7.1
|              |    +--- stax:stax-api:1.0.1
|              |    +--- stax:stax:1.2.0
|              |    |    \--- stax:stax-api:1.0.1
|              |    \--- xpp3:xpp3:1.1.3.3 -> 1.1.4c
|              +--- org.apache.httpcomponents:httpcore:4.4.5
|              \--- com.fasterxml:aalto-xml:1.0.0
|                   \--- org.codehaus.woodstox:stax2-api:4.0.0 -> 4.2.1
+--- com.azure:azure-security-keyvault-secrets:4.2.1
|    +--- com.azure:azure-core:1.8.1 (*)
|    \--- com.azure:azure-core-http-netty:1.6.1
|         +--- com.azure:azure-core:1.8.1 (*)
|         +--- io.netty:netty-handler:4.1.51.Final
|         |    +--- io.netty:netty-common:4.1.51.Final
|         |    +--- io.netty:netty-resolver:4.1.51.Final
|         |    |    \--- io.netty:netty-common:4.1.51.Final
|         |    +--- io.netty:netty-buffer:4.1.51.Final
|         |    |    \--- io.netty:netty-common:4.1.51.Final
|         |    +--- io.netty:netty-transport:4.1.51.Final
|         |    |    +--- io.netty:netty-common:4.1.51.Final
|         |    |    +--- io.netty:netty-buffer:4.1.51.Final (*)
|         |    |    \--- io.netty:netty-resolver:4.1.51.Final (*)
|         |    \--- io.netty:netty-codec:4.1.51.Final
|         |         +--- io.netty:netty-common:4.1.51.Final
|         |         +--- io.netty:netty-buffer:4.1.51.Final (*)
|         |         \--- io.netty:netty-transport:4.1.51.Final (*)
|         +--- io.netty:netty-handler-proxy:4.1.51.Final
|         |    +--- io.netty:netty-common:4.1.51.Final
|         |    +--- io.netty:netty-buffer:4.1.51.Final (*)
|         |    +--- io.netty:netty-transport:4.1.51.Final (*)
|         |    +--- io.netty:netty-codec:4.1.51.Final (*)
|         |    +--- io.netty:netty-codec-socks:4.1.51.Final
|         |    |    +--- io.netty:netty-common:4.1.51.Final
|         |    |    +--- io.netty:netty-buffer:4.1.51.Final (*)
|         |    |    +--- io.netty:netty-transport:4.1.51.Final (*)
|         |    |    \--- io.netty:netty-codec:4.1.51.Final (*)
|         |    \--- io.netty:netty-codec-http:4.1.51.Final
|         |         +--- io.netty:netty-common:4.1.51.Final
|         |         +--- io.netty:netty-buffer:4.1.51.Final (*)
|         |         +--- io.netty:netty-transport:4.1.51.Final (*)
|         |         +--- io.netty:netty-codec:4.1.51.Final (*)
|         |         \--- io.netty:netty-handler:4.1.51.Final (*)
|         +--- io.netty:netty-buffer:4.1.51.Final (*)
|         +--- io.netty:netty-codec-http:4.1.51.Final (*)
|         +--- io.netty:netty-codec-http2:4.1.51.Final
|         |    +--- io.netty:netty-common:4.1.51.Final
|         |    +--- io.netty:netty-buffer:4.1.51.Final (*)
|         |    +--- io.netty:netty-transport:4.1.51.Final (*)
|         |    +--- io.netty:netty-codec:4.1.51.Final (*)
|         |    +--- io.netty:netty-handler:4.1.51.Final (*)
|         |    \--- io.netty:netty-codec-http:4.1.51.Final (*)
|         +--- io.netty:netty-transport-native-unix-common:4.1.51.Final
|         |    +--- io.netty:netty-common:4.1.51.Final
|         |    +--- io.netty:netty-buffer:4.1.51.Final (*)
|         |    \--- io.netty:netty-transport:4.1.51.Final (*)
|         +--- io.netty:netty-transport-native-epoll:4.1.51.Final
|         |    +--- io.netty:netty-common:4.1.51.Final
|         |    +--- io.netty:netty-buffer:4.1.51.Final (*)
|         |    +--- io.netty:netty-transport:4.1.51.Final (*)
|         |    \--- io.netty:netty-transport-native-unix-common:4.1.51.Final (*)
|         +--- io.netty:netty-transport-native-kqueue:4.1.51.Final
|         |    +--- io.netty:netty-common:4.1.51.Final
|         |    +--- io.netty:netty-buffer:4.1.51.Final (*)
|         |    +--- io.netty:netty-transport:4.1.51.Final (*)
|         |    \--- io.netty:netty-transport-native-unix-common:4.1.51.Final (*)
|         \--- io.projectreactor.netty:reactor-netty:0.9.11.RELEASE
|              +--- io.netty:netty-codec-http:4.1.51.Final (*)
|              +--- io.netty:netty-codec-http2:4.1.51.Final (*)
|              +--- io.netty:netty-handler:4.1.51.Final (*)
|              +--- io.netty:netty-handler-proxy:4.1.51.Final (*)
|              +--- io.netty:netty-transport-native-epoll:4.1.51.Final (*)
|              \--- io.projectreactor:reactor-core:3.3.9.RELEASE (*)
+--- org.apache.logging.log4j:log4j-slf4j-impl:2.0
|    +--- org.slf4j:slf4j-api:1.7.7 -> 1.7.30
|    \--- org.apache.logging.log4j:log4j-api:2.0
+--- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.11.2 (*)
+--- com.fasterxml.jackson.core:jackson-databind:2.11.2 (*)
\--- org.slf4j:slf4j-api:1.7.30

Any tips on beating this? I tried forcing the version, but it doesn't seem to work
Why is this not a Bug or a feature Request?
I have a feeling that it's not a bug and something related to Spring / Rundeck / Plugin Path
Setup (please complete the following information if applicable):

OS: Windows 10
IDE : Intellij

    pluginLibs group: "com.azure", name: "azure-security-keyvault-secrets", version: "4.2.1"

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

Note that Rundeck uses spring 5 / spring boot / grails under the hood

Hi @thebenwaters, it looks like this issue happens while looking for a class in the classpath, do you mind running your repro again with the system property jaxp.debug set to true? This should add more debugging output to go along with the stack trace.

[2020-09-23T09:39:12,118] WARN  azurekeyvaultstorage.AzureKeyVaultStoragePlugin - DocumentBuilderFactory implementation: com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl loaded from: Java Runtime
JAXP: using thread context class loader (org.springframework.boot.loader.LaunchedURLClassLoader@5010be6) for search
JAXP: Looking up system property 'javax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom'
JAXP: The property is undefined.
JAXP: found null in $java.home/conf/jaxp.properties
JAXP: attempting to use the platform default W3C DOM XPath lib
JAXP: factory 'com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl' was found for http://java.sun.com/jaxp/xpath/dom
[2020-09-23T09:39:12,131] WARN  azurekeyvaultstorage.AzureKeyVaultStoragePlugin - XPathFactory implementation: com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl loaded from: Java Runtime
[2020-09-23T09:39:12,133] WARN  azurekeyvaultstorage.AzureKeyVaultStoragePlugin - TransformerFactory implementation: com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl loaded from: Java Runtime
[2020-09-23T09:39:12,135] WARN  azurekeyvaultstorage.AzureKeyVaultStoragePlugin - SAXParserFactory implementation: com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl loaded from: Java Runtime

Succeeded
Success!
dependencies {
    compile 'org.rundeck:rundeck-storage-api:3.0.27-20191204'
    compile "org.rundeck:rundeck-core:3.0.27-20191204"
    pluginLibs(group: "com.azure", name: "azure-identity", version: "1.1.2"){
        exclude group:'org.slf4j', module: 'slf4j-api'
    }
    pluginLibs group: "com.azure", name: "azure-security-keyvault-secrets", version: "4.2.1"
    pluginLibs group: "org.apache.logging.log4j", name: "log4j-slf4j-impl", version: "2.0"
    pluginLibs group: "com.fasterxml.woodstox", name: "woodstox-core", version: "6.2.1"
    runtime group: 'org.slf4j', name: 'slf4j-api', version: '1.7.30'
    runtime group: "com.fasterxml.woodstox", name: "woodstox-core", version: "6.2.1"
}

def libList = configurations.pluginLibs.findAll({!it.name.contains("stax")}).collect{'lib/'+it.name}.join(' ')

hi, how did u fixed this?

@gilangarinata by adding this line to the gradle file
def libList = configurations.pluginLibs.findAll({!it.name.contains("stax")}).collect{'lib/'+it.name}.join(' ')

source: gharchive/issue

authors: alzimmermsft beneshed gilangarinata thebenwaters

repo: Azure/azure-sdk-for-java


text:
Update Learn modules for Event Hubs

This issue is to review the learn modules in https://docs.microsoft.com/en-us/learn/ that are for Java developers in the area of Event Hubs and update them if they are not using the latest version of the Event Hubs package

Closing in favor of the change in scope as described in https://github.com/azure/azure-sdk-for-js/issues/12368

authors: AlexGhiondea ramya-rao-a


text:
Deserialization exception when using app service certificate orders

Hey all,
I'm trying to use this awesome SDK to create autodeployed SSL WebApps and unfortunately am running into an issue when trying to use an existing AppServiceCertificateOrder.
Because AppServiceCertificateOrderInner.java uses
@JsonProperty(value = "properties.certificates")
private Map<String, AppServiceCertificate> certificates;
for its definition, when trying to make the following call
AppServiceCertificateOrder certificateOrder = azure.appServices().certificateOrders().getById(APPSERVICE_CERT_ORDER_ID);
I get this jackson deserialization exception instead (JSON content removed because it contains sensitive data):
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of com.microsoft.azure.management.appservice.AppServiceCertificate, problem: abstract types either need to be mapped to concrete types, have custom deserializer, or be instantiated with additional type information  at [Source: {"id":"..."}}; line: 1, column: 9156] (through reference chain: com.microsoft.azure.management.appservice.implementation.AppServiceCertificateOrderInner["properties.certificates"]->java.util.LinkedHashMap["igxcwildcard"]) 	at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:216) 	at com.fasterxml.jackson.databind.DeserializationContext.instantiationException(DeserializationContext.java:908) 	at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserialize(AbstractDeserializer.java:150) 	at com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringMap(MapDeserializer.java:495) 	at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:341) 	at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:26) 	at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:490) 	at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:101) 	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:260) 	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:125) 	at com.microsoft.rest.serializer.FlatteningDeserializer.deserialize(FlatteningDeserializer.java:109) 	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3789) 	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2817) 	at com.microsoft.rest.serializer.JacksonAdapter.deserialize(JacksonAdapter.java:131) 	at com.microsoft.rest.ServiceResponseBuilder.buildBody(ServiceResponseBuilder.java:216) 	at com.microsoft.rest.ServiceResponseBuilder.build(ServiceResponseBuilder.java:110) 	at com.microsoft.azure.AzureResponseBuilder.build(AzureResponseBuilder.java:56) 	at com.microsoft.azure.management.appservice.implementation.AppServiceCertificateOrdersInner.getByResourceGroupDelegate(AppServiceCertificateOrdersInner.java:556) 	at com.microsoft.azure.management.appservice.implementation.AppServiceCertificateOrdersInner.access$300(AppServiceCertificateOrdersInner.java:46) 	at com.microsoft.azure.management.appservice.implementation.AppServiceCertificateOrdersInner$17.call(AppServiceCertificateOrdersInner.java:543) 	at com.microsoft.azure.management.appservice.implementation.AppServiceCertificateOrdersInner$17.call(AppServiceCertificateOrdersInner.java:539)
Any ideas would be greatly appreciated, as I need to get this project along and the code as is seems to break every use of AppServiceCertificateOrders with contained certificates.

any chance we could BODY_AND_HEADERS logging turned on and have the log attached here?  (remove sensitive info - token, urls the cert is bound to, etc)

authors: martinsawicki npeuser


text:
[QUERY] How to fetch refresh token from Azure Identity?

Query/Question
I see that the following feature will be added in the upcoming release.
Ref: https://github.com/Azure/azure-sdk-for-java/issues/19734

Request: Add support for fetching an access token from a refresh token

Along with this feature, will there also be a way to get the refresh token from AuthorizationCodeCredential?
Why is this not a Bug or a feature Request?
NA
Setup (please complete the following information if applicable):
NA
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

Hi @ivanmaria, thanks for filing this request.  I'm closing this as a duplicate of https://github.com/Azure/azure-sdk-for-java/issues/21104.  Thanks again.

authors: ivanmaria joshfree


text:
[OpenAI][Archboard-Feedback] Options bags uses ellipsis operator "..." instead of List

Use "String..." instead of "List" in the option bag.
CompletionsOptions: prompt type
ChatCompletionsOptions: messages type
EmbeddingsOptions: input type

This is nice to have but may not be worth to add it now. Let's wait for more evidence to see if we need to add an overload method that takes ellipsis operator for all options bags before GA.


text:
[BUG] Hitting the exception 'cannot make a new request because the previous response is still open: please call response.close()'

Describe the bug
While using the Azure java SDK to make API calls to Azure, we faced this issue. After making a few number of requests to the list storage accounts API call, we hit the exception java.lang.RuntimeException: java.io.IOException: java.lang.IllegalStateException: cannot make a new request because the previous response is still open: please call response.close()
Exception or Stack Trace
java.lang.RuntimeException: java.io.IOException: java.lang.IllegalStateException: cannot make a new request because the previous response is still open: please call response.close()
        at rx.exceptions.Exceptions.propagate(Exceptions.java:57) ~[sd-0.1.jar:?]
        at rx.observables.BlockingObservable.blockForSingle(BlockingObservable.java:463) ~[sd-0.1.jar:?]
        at rx.observables.BlockingObservable.single(BlockingObservable.java:340) ~[sd-0.1.jar:?]
        at com.microsoft.azure.management.compute.implementation.VirtualMachinesInner$61.nextPage(VirtualMachinesInner.java:1749) ~[sd-0.1.jar:?]
        at com.microsoft.azure.management.resources.fluentcore.utils.PagedListConverter$2.nextPage(PagedListConverter.java:70) ~[sd-0.1.jar:?]
        at com.microsoft.azure.PagedList.cachePage(PagedList.java:62) ~[sd-0.1.jar:?]
        at com.microsoft.azure.PagedList.<init>(PagedList.java:56) ~[sd-0.1.jar:?]
        at com.microsoft.azure.management.resources.fluentcore.utils.PagedListConverter$2.<init>(PagedListConverter.java:67) ~[sd-0.1.jar:?]
        at com.microsoft.azure.management.resources.fluentcore.utils.PagedListConverter.convert(PagedListConverter.java:67) ~[sd-0.1.jar:?]
        at com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.ReadableWrappersImpl.wrapList(ReadableWrappersImpl.java:43) ~[sd-0.1.jar:?]
        at com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.TopLevelModifiableResourcesImpl.list(TopLevelModifiableResourcesImpl.java:118) ~[sd-0.1.jar:?]

Caused by: java.io.IOException: java.lang.IllegalStateException: cannot make a new request because the previous response is still open: please call response.close()
        at com.microsoft.azure.management.resources.fluentcore.utils.ResourceManagerThrottlingInterceptor.intercept(ResourceManagerThrottlingInterceptor.java:110) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[sd-0.1.jar:?]
        at com.microsoft.azure.management.resources.fluentcore.utils.ProviderRegistrationInterceptor.intercept(ProviderRegistrationInterceptor.java:43) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[sd-0.1.jar:?]
        at com.microsoft.rest.interceptors.BaseUrlHandler.intercept(BaseUrlHandler.java:43) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[sd-0.1.jar:?]
        at com.microsoft.rest.interceptors.RequestIdHeaderInterceptor.intercept(RequestIdHeaderInterceptor.java:29) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[sd-0.1.jar:?]
        at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:221) ~[sd-0.1.jar:?]
        at okhttp3.RealCall.execute(RealCall.java:81) ~[sd-0.1.jar:?]
        at retrofit2.OkHttpCall.execute(OkHttpCall.java:186) ~[sd-0.1.jar:?]
        at retrofit2.adapter.rxjava.CallExecuteOnSubscribe.call(CallExecuteOnSubscribe.java:40) ~[sd-0.1.jar:?]
        at retrofit2.adapter.rxjava.CallExecuteOnSubscribe.call(CallExecuteOnSubscribe.java:24) ~[sd-0.1.jar:?]
        at rx.Observable.unsafeSubscribe(Observable.java:10327) ~[sd-0.1.jar:?]
        at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48) ~[sd-0.1.jar:?]
        at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33) ~[sd-0.1.jar:?]
        at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48) ~[sd-0.1.jar:?]
        at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30) ~[sd-0.1.jar:?]
        at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48) ~[sd-0.1.jar:?]
        at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30) ~[sd-0.1.jar:?]
        at rx.Observable.subscribe(Observable.java:10423) ~[sd-0.1.jar:?]
        at rx.Observable.subscribe(Observable.java:10390) ~[sd-0.1.jar:?]
        at rx.observables.BlockingObservable.blockForSingle(BlockingObservable.java:443) ~[sd-0.1.jar:?]
        ... 65 more
Caused by: java.lang.IllegalStateException: cannot make a new request because the previous response is still open: please call response.close()
        at okhttp3.internal.connection.Transmitter.newExchange(Transmitter.java:164) ~[sd-0.1.jar:?]
        at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[sd-0.1.jar:?]
        at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[sd-0.1.jar:?]
        at com.microsoft.rest.retry.RetryHandler.intercept(RetryHandler.java:75) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[sd-0.1.jar:?]
        at com.microsoft.rest.interceptors.CustomHeadersInterceptor.intercept(CustomHeadersInterceptor.java:140) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[sd-0.1.jar:?]
        at com.microsoft.rest.interceptors.UserAgentInterceptor.intercept(UserAgentInterceptor.java:83) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[sd-0.1.jar:?]
        at com.microsoft.azure.credentials.AzureTokenCredentialsInterceptor.intercept(AzureTokenCredentialsInterceptor.java:40) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[sd-0.1.jar:?]
        at com.microsoft.azure.management.resources.fluentcore.utils.ResourceManagerThrottlingInterceptor.intercept(ResourceManagerThrottlingInterceptor.java:108) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[sd-0.1.jar:?]
        at com.microsoft.azure.management.resources.fluentcore.utils.ProviderRegistrationInterceptor.intercept(ProviderRegistrationInterceptor.java:43) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[sd-0.1.jar:?]
        at com.microsoft.rest.interceptors.BaseUrlHandler.intercept(BaseUrlHandler.java:43) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[sd-0.1.jar:?]
        at com.microsoft.rest.interceptors.RequestIdHeaderInterceptor.intercept(RequestIdHeaderInterceptor.java:29) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[sd-0.1.jar:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[sd-0.1.jar:?]
        at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:221) ~[sd-0.1.jar:?]
        at okhttp3.RealCall.execute(RealCall.java:81) ~[sd-0.1.jar:?]
        at retrofit2.OkHttpCall.execute(OkHttpCall.java:186) ~[sd-0.1.jar:?]
        at retrofit2.adapter.rxjava.CallExecuteOnSubscribe.call(CallExecuteOnSubscribe.java:40) ~[sd-0.1.jar:?]
        at retrofit2.adapter.rxjava.CallExecuteOnSubscribe.call(CallExecuteOnSubscribe.java:24) ~[sd-0.1.jar:?]
        at rx.Observable.unsafeSubscribe(Observable.java:10327) ~[sd-0.1.jar:?]
        at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48) ~[sd-0.1.jar:?]
        at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33) ~[sd-0.1.jar:?]
        at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48) ~[sd-0.1.jar:?]
        at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30) ~[sd-0.1.jar:?]
        at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48) ~[sd-0.1.jar:?]
        at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30) ~[sd-0.1.jar:?]
        at rx.Observable.subscribe(Observable.java:10423) ~[sd-0.1.jar:?]
        at rx.Observable.subscribe(Observable.java:10390) ~[sd-0.1.jar:?]
        at rx.observables.BlockingObservable.blockForSingle(BlockingObservable.java:443) ~[sd-0.1.jar:?]
        ... 65 more

To Reproduce
Created a azure client and called the list storage accounts API call 100 times using the following snippet:
      new ApplicationTokenCredentials(
                          clientId,
                          tenantId,
                          clientSecret,
                          azureEnvironment
                        )

  val azure =
    Azure.configure.withReadTimeout(timeout,TimeUnit.MILLISECONDS).withConnectionTimeout(timeout,TimeUnit.MILLISECONDS).authenticate(appCredentials).withSubscription("<subscriptionId>")

for (i <- 1 to 100) {
	println(i)
	azure.storageAccounts().list()
}

And this fails with the following :
1
<..>
<..>
<..>
99
2019-11-29T15:53:58.237+0530 ERROR <.main> [compute.AzureComputeClientImpl]  An unknown exception is thrown. Will not be retrying.
java.lang.RuntimeException: java.io.IOException: java.lang.IllegalStateException: cannot make a new request because the previous response is still open: please call response.close()
	at rx.exceptions.Exceptions.propagate(Exceptions.java:57) ~[generated-intellij-deps.jar:?]
	at rx.observables.BlockingObservable.blockForSingle(BlockingObservable.java:463) ~[generated-intellij-deps.jar:?]
	at rx.observables.BlockingObservable.single(BlockingObservable.java:340) ~[generated-intellij-deps.jar:?]
	at com.microsoft.azure.management.storage.implementation.StorageAccountsInner.list(StorageAccountsInner.java:743) ~[generated-intellij-deps.jar:?]
	at com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.TopLevelModifiableResourcesImpl.list(TopLevelModifiableResourcesImpl.java:118)

Expected behavior
The response should be same everytime and should not give the above exception.
Setup

Azure java sdk version : 1.24.2
Azure key vault version : 1.2.2

Additional context
We started seeing this exception when we recently upgraded out okhttp3 package.
Similar issue can be seen here but is closed and should have been resolved with key vault version 1.2.2 : https://github.com/Azure/azure-sdk-for-java/issues/4879

@ChenTanyi, could you help take a look at this issue? Thanks.

@vashisthsaurabh I cannot reproduce the issue. My code runs with success:
    <dependency>
      <groupId>com.microsoft.azure</groupId>
      <artifactId>azure</artifactId>
      <version>1.24.2</version>
    </dependency>

            ApplicationTokenCredentials credentials = ApplicationTokenCredentials.fromFile(credFile);
            Azure azure = Azure.configure()
//                    .withReadTimeout(1000, TimeUnit.MILLISECONDS)
//                    .withConnectionTimeout(1000, TimeUnit.MILLISECONDS)
                    .authenticate(credentials)
                    .withDefaultSubscription();

            for (int i = 0; i < 200; ++i) {
                azure.storageAccounts().list();
            }

            System.out.println(azure.storageAccounts().list().size()); // 23
// since the timeout will cause a timeout exception. so I run without it.

Can you provide more detail about it? like the timeout number, your storage account number or so on, and could you check whether there are some Failed or Terminated states in your storage accounts?
What do you use for Azure key vault, since the code snippet doesn't need such dependency?

@ChenTanyi Yes sure,
Timeout : 30 mins.
Storage account number : 14
Can this issue appear because of the timeouts or storage account numbers ?
Not sure but I think error in these things should not relate to the above mentioned exception/stack trace. This is somewhere related to the responses not being closed by azure sdk maybe ? And we saw this after we upgraded our okhttp3 version. Can you share the version of okhttp3 you used for this test ?
The code base is quite big and it's not just this snippet. So we might be using Azure key vault in some code path.

@vashisthsaurabh I just want to double check the parameters. Since the timeout is 30 mins, it is the same as no timeout like the above. So this is mostly your runtime issue about some client didn't close after http response, you could check some other code snippet about it.
My test code is simple, and I didn't directly import okhttp3, my code is: https://github.com/tanyi-test/azure-sdk-for-java-6588

@yaohaizh @ChenTanyi  What are the next steps that can help troubleshoot this ?

@vashisthsaurabh I can't reproduce you problem, thus I am not able to explore further about it. Can you find a code snippet which can reproduce it every time? Thanks.
Like you said above, the may related to somewhere not being closed response, but I don't know your other code. Thus, I cannot know where is the code causing it.

@ChenTanyi I feel this may be related to ResourceManagerThrottlingInterceptor
The first retry in ResourceManagerThrottlingInterceptor do not close the response before calling the chain.proceed().

@ashbondu Do you also meet this problem? If it is related to ResourceManagerThrottlingInterceptor, can you test without it as a try?
change .authenticate(appCredentials) to
        RestClient restClient = new RestClient.Builder()
                .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER)
                .withCredentials(credentials)
                .withSerializerAdapter(new JacksonAdapter())
                .withResponseBuilderFactory(new AzureResponseBuilder.Factory())
                .build();

        Azure....authenticate(restClient, credentials.domain())...

@ashbondu Thanks for feedback, we will take a look at it.

I've got the same issue, the snippet that trigger the problem
val images = azure
                .virtualMachineImages()
                .listByRegion(REGION)
                .iterator()
images.next()
Thread.sleep(300000) // 300 seconds
images.next() // trigger the exception

We are also experiencing this problem in a variety of different situations. We reach the rate limit in different places of our process, for different reasons and instead of retrying correctly, an IllegalStateException is thrown.
An excerpt of the stacktrace:
2020-05-08 10:18:29,655 [WARN ][async-callback-38][com.hybris.cloud.automation.processmanagement.external.ExternalTaskExecutor$ExecutionCallbackImpl][process-id=448811, activiti-id=provision_media_storage, task-id=448828] Failed to execute 'createMediaStorageTask'. Retry it 2020-05-08T10:23:29.655Z. Retries left 5.
java.lang.RuntimeException: java.io.IOException: java.lang.IllegalStateException: cannot make a new request because the previous response is still open: please call response.close()
...
...
...

Caused by: java.io.IOException: java.lang.IllegalStateException: cannot make a new request because the previous response is still open: please call response.close()
	at com.microsoft.azure.management.resources.fluentcore.utils.ResourceManagerThrottlingInterceptor.intercept(ResourceManagerThrottlingInterceptor.java:110)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
	at com.microsoft.azure.management.resources.fluentcore.utils.ProviderRegistrationInterceptor.intercept(ProviderRegistrationInterceptor.java:40)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
	at com.hybris.cloud.automation.azureintegration.AzureLogHeadersInterceptor.intercept(AzureLogHeadersInterceptor.java:34)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
	at com.microsoft.rest.interceptors.BaseUrlHandler.intercept(BaseUrlHandler.java:43)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
	at com.microsoft.rest.interceptors.RequestIdHeaderInterceptor.intercept(RequestIdHeaderInterceptor.java:29)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:229)
	at okhttp3.RealCall.execute(RealCall.java:81)
	at retrofit2.OkHttpCall.execute(OkHttpCall.java:188)
	at retrofit2.adapter.rxjava.CallExecuteOnSubscribe.call(CallExecuteOnSubscribe.java:40)
	at retrofit2.adapter.rxjava.CallExecuteOnSubscribe.call(CallExecuteOnSubscribe.java:24)
	at rx.Observable.unsafeSubscribe(Observable.java:10327)
	at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
	at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
	at rx.Observable.unsafeSubscribe(Observable.java:10327)
	at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
	at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
	at rx.Observable.unsafeSubscribe(Observable.java:10327)
	at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
	at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
	at rx.Observable.unsafeSubscribe(Observable.java:10327)
	at rx.internal.operators.DeferredScalarSubscriber.subscribeTo(DeferredScalarSubscriber.java:153)
	at rx.internal.operators.OnSubscribeTakeLastOne.call(OnSubscribeTakeLastOne.java:32)
	at rx.internal.operators.OnSubscribeTakeLastOne.call(OnSubscribeTakeLastOne.java:22)
	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
	at rx.Observable.subscribe(Observable.java:10423)
	at rx.Observable.subscribe(Observable.java:10390)
	at rx.observables.BlockingObservable.blockForSingle(BlockingObservable.java:443)
	... 93 common frames omitted
Caused by: java.lang.IllegalStateException: cannot make a new request because the previous response is still open: please call response.close()
	at okhttp3.internal.connection.Transmitter.newExchange(Transmitter.java:164)
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
	at com.microsoft.rest.retry.RetryHandler.intercept(RetryHandler.java:75)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
	at com.microsoft.rest.interceptors.CustomHeadersInterceptor.intercept(CustomHeadersInterceptor.java:140)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
	at com.microsoft.rest.interceptors.UserAgentInterceptor.intercept(UserAgentInterceptor.java:83)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
	at com.microsoft.azure.credentials.AzureTokenCredentialsInterceptor.intercept(AzureTokenCredentialsInterceptor.java:40)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
	at com.microsoft.azure.management.resources.fluentcore.utils.ResourceManagerThrottlingInterceptor.intercept(ResourceManagerThrottlingInterceptor.java:108)
	... 132 common frames omitted

+1

@ashbondu @manuelmazzuola @Tony-A-J-Martin Is there any special environment you are using?
I have tried with 429 and thread sleep, but they all worked as expected. I could not reproduce it. Is there any unclosed in your other code?
It seems many people meet this problem, but if no one providers a code snippet that can reproduce it every time or just by chance, no any further exploration could be done.
(I even tested with multi-thread, but it still cannot reproduce.)
I'll try to close response before sleep, but I'm not sure whether it works.
The screenshot is:

@vashisthsaurabh  @ashbondu @manuelmazzuola @Tony-A-J-Martin @dy10 I've added some response.close in ResourceManagerThrottlingInterceptor, could you have a try with the 1.34.0?
If the exception could be resolved I'll close this issue.  Thanks!

@ChenTanyi , I can confirm that for us, 1.34.0 resolves the response.close() issue. Now, instead of a RuntimeException, we get a CloudException and the retries are successfully carried out eventually resulting in a successful process. 🥳
Thank you for you help @ChenTanyi , it is very much appreciated.

@Tony-A-J-Martin Thanks for your confirm.
The issue will be open for a few days and then be closed.

authors: ChenTanyi Tony-A-J-Martin ashbondu dy10 manuelmazzuola vashisthsaurabh yaohaizh


text:
Add integration test module for appconfiguration

Add integration test module for appconfiguration

/azp run java - appconfiguration - tests

/azp run java - appconfiguration - tests

/azp run java - appconfiguration - tests

/azp run java - appconfiguration - tests

/azp run java - appconfiguration - tests

/azp run java - appconfiguration - tests

/azp run java - appconfiguration - tests

/azp run java - appconfiguration - tests

/azp run java - spring - ci

/azp run java - spring - ci

Hi, @saragluna , please review this PR. 🙏 .

/azp run java - appconfiguration - tests

/azp run java - appconfiguration - tests

Hi, @mrm9084 .

Please review this PR.
After this PR merged, could you please add integration test?

/azp run java - appconfiguration - tests

/azp run java - appconfiguration - tests

Hi, @saragluna .
Please review this PR when you have time. 🙏


text:
[AutoPR] resources/resource-manager

Created to accumulate context: resources/resource-manager

Build output:

dist/com.microsoft.azure.features.v2015_12_01/azure-mgmt-features-1.0.0-beta.jar
dist/com.microsoft.azure.features.v2015_12_01/azure-mgmt-features-1.0.0-beta.pom
dist/com.microsoft.azure.features.v2015_12_01/azure-mgmt-features-1.0.0-beta-javadoc.jar
dist/com.microsoft.azure.features.v2015_12_01/azure-mgmt-features-1.0.0-beta-sources.jar
dist/com.microsoft.azure.policy.v2016_12_01/azure-mgmt-policy-1.0.0-beta.pom
dist/com.microsoft.azure.policy.v2016_12_01/azure-mgmt-policy-1.0.0-beta-sources.jar
dist/com.microsoft.azure.policy.v2016_12_01/azure-mgmt-policy-1.0.0-beta.jar
dist/com.microsoft.azure.policy.v2016_12_01/azure-mgmt-policy-1.0.0-beta-javadoc.jar
dist/com.microsoft.azure.resources.v2018_02_01/azure-mgmt-resources-1.0.0-beta.jar
dist/com.microsoft.azure.resources.v2018_02_01/azure-mgmt-resources-1.0.0-beta-sources.jar
dist/com.microsoft.azure.resources.v2018_02_01/azure-mgmt-resources-1.0.0-beta-javadoc.jar
dist/com.microsoft.azure.resources.v2018_02_01/azure-mgmt-resources-1.0.0-beta.pom
dist/com.microsoft.azure.locks.v2016_09_01/azure-mgmt-locks-1.0.0-beta-sources.jar
dist/com.microsoft.azure.locks.v2016_09_01/azure-mgmt-locks-1.0.0-beta.pom
dist/com.microsoft.azure.locks.v2016_09_01/azure-mgmt-locks-1.0.0-beta.jar
dist/com.microsoft.azure.locks.v2016_09_01/azure-mgmt-locks-1.0.0-beta-javadoc.jar
dist/com.microsoft.azure.resources.v2016_09_01/azure-mgmt-resources-1.0.0-beta.jar
dist/com.microsoft.azure.resources.v2016_09_01/azure-mgmt-resources-1.0.0-beta-sources.jar
dist/com.microsoft.azure.resources.v2016_09_01/azure-mgmt-resources-1.0.0-beta-javadoc.jar
dist/com.microsoft.azure.resources.v2016_09_01/azure-mgmt-resources-1.0.0-beta.pom
dist/com.microsoft.azure.policy.v2018_03_01/azure-mgmt-policy-1.0.0-beta.pom
dist/com.microsoft.azure.policy.v2018_03_01/azure-mgmt-policy-1.0.0-beta-sources.jar
dist/com.microsoft.azure.policy.v2018_03_01/azure-mgmt-policy-1.0.0-beta.jar
dist/com.microsoft.azure.policy.v2018_03_01/azure-mgmt-policy-1.0.0-beta-javadoc.jar
dist/com.microsoft.azure.policy.v2018_05_01/azure-mgmt-policy-1.0.0-beta.pom
dist/com.microsoft.azure.policy.v2018_05_01/azure-mgmt-policy-1.0.0-beta-sources.jar
dist/com.microsoft.azure.policy.v2018_05_01/azure-mgmt-policy-1.0.0-beta.jar
dist/com.microsoft.azure.policy.v2018_05_01/azure-mgmt-policy-1.0.0-beta-javadoc.jar

Closing PRs that are older than 1 month.

authors: AutorestCI conniey


text:
Create proton-j sessions in ReactorDispatcher rather than outside of the reactor-executor [commits by Connie in 37471].

Resurfacing @conniey's PR: https://github.com/Azure/azure-sdk-for-java/pull/37471

Bringing up all the commits that Connie made to ensure Amqp sessions are created using reactor-executor.

API change check
API changes are not detected in this pull request.

authors: anuchandy azure-sdk


text:
Storage - Replace Iterator with PagedIterable/IterableResponse for Sync API

This will change Storage sync  client.
Replace Iterator with PagedIterable/IterableResponse as appropriate.

Fixed by #5186

authors: alzimmermsft hemanttanwar


text:
Adds support for Sync API read latency and read throughput benchmark

Adds support for Sync API read latency and read throughput.
This provides a baseline for perf improvement for sync API of v4.

/azp run java - cosmos - tests


text:
azure-sdk fails to build on Typescript 4.0

Package Version:
building from master
[ ] typescript

version:4.0

Describe the bug
Typescript 4.0 has two changes that break azure-sdk:

The Typescript API now requires all 3 arguments to typeToTypeNode. The last 2 can be undefined, but must be provided.
delete may now only delete properties marked as optional. Typescript now uses control flow to mark deleted properties as undefined so they can't be used afterwards. But this only works if the properties were optional in the first place.

To Reproduce
Steps to reproduce the behavior:

Update to typescript@beta and try to build azure-sdk.

I'll send a PR shortly to mark all the places that fail. I didn't know how to convert all those properties to optional, so I just cast the object to any to silence the error.

@deyaaeldeen maybe we should consider upgrading directly to 4.1 at this point? What do you think?

authors: sandersn xirzec

repo: Azure/azure-sdk-for-js


text:
[Text Analytics] Revise documentation

Make sure the documentation looks good before releasing the stable version.

Addressed


text:
Keyvault authentication is throwing 401s with @azure/identity : "4.1.0"

Package Name:  @azure/identity
Package Version:  4.1.0
Operating system: Linux
[ ] nodejs

version:  v18.17.1

[ ] browser

name/version:

[ ] typescript

version:

Is the bug related to documentation in

[ ] README.md
[ ] source code documentation
[ ] SDK API docs on https://learn.microsoft.com

Describe the bug
Application insight is showing 401s with the key vault authentication all the time even though  it succeeds with the subsequent calls .    We are using user assigned managed identity for auth. Wondering why it is throwing 401s when we have proper identity mechanisms in place. Please help thank you in advance .
When using the previous version of the package , not seeing it logged in app insight.  it is either not logged in app insight or not happening.

import { get, put } from 'memory-cache';
import { DefaultAzureCredential } from '@azure/identity';
import { SecretClient } from '@azure/keyvault-secrets';

const keyVaultUrl = process.env.KeyVault__Uri || process.env.KEY_VAULT_URL;
const credential = new DefaultAzureCredential();
const cacheExpirationInMs = 300000;

export const getSecret = async id => {
    let secret = get(id);
    if (!secret) {
        //What if this fails? We should use the previous value, but it's lost.
        **const client = new SecretClient(keyVaultUrl, credential);**
        const foundSecret = await client.getSecret(id);
        secret = foundSecret.value ?? null;
        put(id, secret, cacheExpirationInMs);
    }
    return secret;
};

To Reproduce
Steps to reproduce the behavior:
1.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.

Hey @cs-samvith - thanks for reaching out about this. While I admittedly don't have a good answer for why you were not seeing this 401 logged in applicationinsights in prior versions, I do believe that calls to KeyVault are expected to start with a 401 and succeed on a subsequent call as part of KeyVault's continuous access evaluation support - please see this document that describes the flow.
Looking at the code, I see you are initializing a new SecretClient every time getSecret is called. Consider restructuring your code to reuse the same credential and SecretClient to avoid unnecessary overhead like initializing caches and the first 401 response. Something like this:
import { get, put } from 'memory-cache';
import { DefaultAzureCredential } from '@azure/identity';
import { SecretClient } from '@azure/keyvault-secrets';

const keyVaultUrl = process.env.KeyVault__Uri || process.env.KEY_VAULT_URL;
const credential = new DefaultAzureCredential();
const cacheExpirationInMs = 300000;
const client = new SecretClient(keyVaultUrl, credential);

export const getSecret = async id => {
    let secret = get(id);
    if (!secret) {
        const foundSecret = await client.getSecret(id);
        secret = foundSecret.value ?? null;
        put(id, secret, cacheExpirationInMs);
    }
    return secret;
};

As for why you're seeing this now and not in previous versions, I wonder if enabling verbose logging and inspecting the calls would be helpful - you could do that by setting the AZURE_LOG_LEVEL environment variable to "verbose" - you could then inspect the logs to see what requests / responses are being made. Unfortunately I just don't know applicationinsights well enough to provide a better answer but if the logs show different calls being made we'll happily investigate!

@maorleger  - Thank you for the response and I tried your suggestion . and the results are
Before the change
I was seeing 401s at 100% (ie for each 200 response there was a 401 response too )
After the change
The rate has reduced to around 50% . (ie 200s - 1640 and 401s - 751 )
So 401s are still happening . Any idea why ?

401 with a call status true??

Glad the rate was reduced! I believe this is expected per https://learn.microsoft.com/en-us/azure/key-vault/general/authentication-requests-and-responses#authentication
Specifically:
Key Vault SDK clients for secrets, certificates, and keys in the first call to Key Vault do not provide an access token to retrieve tenant information. It’s expected to receive an HTTP 401 using Key Vault SDK client where the Key Vault shows to the application the WWW-Authenticate header containing the resource and the tenant where it needs to go and ask for the token. If everything is configured correctly, the second call from the application to Key Vault will contain a valid token and will succeed.

Ok . Thank you @maorleger  for clarifying . Am closing this one!

authors: cs-samvith maorleger


text:
Sync eng/common directory with azure-sdk-tools for PR 1459

Sync eng/common directory with azure-sdk-tools for PR https://github.com/Azure/azure-sdk-tools/pull/1459  See eng/common workflow

/check-enforcer override

authors: azure-sdk chidozieononiwu


text:
release-for-synapse-access-control-rlc

Packages impacted by this PR
@azure-rest/synapse-access-control
Issues associated with this PR
Describe the problem that is addressed by this PR
refresh @azure-rest/synapse-access-control with latest code generator and swagger as of service team's requirement
What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?
Are there test cases added in this PR? (If not, why?)
Provide a list of related PRs (if any)
Command used to generate this PR:**(Applicable only to SDK release request PRs)
Checklists

[ ] Added impacted package name to the issue description
[ ] Does this PR needs any fixes in the SDK Generator?** (If so, create an Issue in the Autorest/typescript repository and link it here)
[ ] Added a changelog (if necessary)

API change check
APIView has identified API level changes in this PR and created following API reviews.
azure-rest-synapse-access-control

authors: azure-sdk qiaozha


text:
Post release automated changes for imagebuilder releases

Post release automated changes for azure-arm-imagebuilder

API change check
API changes are not detected in this pull request.


text:
Post release automated changes for policy releases

Post release automated changes for azure-arm-policy

API change check
API changes are not detected in this pull request.


text:
Update README.md

Packages impacted by this PR
@azure-rest/ai-vision-image-analysis
Issues associated with this PR
Describe the problem that is addressed by this PR
Broken links in readme.md
What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?
N/A
Are there test cases added in this PR? (If not, why?)
Provide a list of related PRs (if any)
Command used to generate this PR:**(Applicable only to SDK release request PRs)
Checklists

[ ] Added impacted package name to the issue description
[ ] Does this PR needs any fixes in the SDK Generator?** (If so, create an Issue in the Autorest/typescript repository and link it here)
[ ] Added a changelog (if necessary)

API change check
APIView has identified API level changes in this PR and created following API reviews.
@azure-rest/ai-vision-image-analysis

authors: azure-sdk rhurey


text:
Sync eng/common directory with azure-sdk-tools for PR 7767

Sync eng/common directory with azure-sdk-tools for PR https://github.com/Azure/azure-sdk-tools/pull/7767  See eng/common workflow

I'm going to override check enforcer. The linter pipeline passed which is the only thing running which tests this change.

/check-enforcer override

authors: JimSuplizio azure-sdk


text:
Inherit core-tracing tsconfig.json from root

Per #5276 , let's start migrating to common tsconfig.json settings rather than having a different set of checks enabled for each package.

one nitpick: comments in JSON cause a lot of editors to turn extremely red because they aren't part of the true JSON spec. Is it possible for us to either configure the repo with workspace settings that will ignore that, or alternatively just remove the comments from the JSON? Since tsconfig/rush/etc. are all schematized we should have good enough IntelliSense to not need every option documented inline when we come back to change these files.

Yeah I don't like JSON+Comments either. I believe @bterlson said he was fine with removing them.

@willmtemple can you take another look? Thanks 👍

Yep feel free to remove any and all syntactic extensions to JSON. It's just and proper to do so.

authors: bterlson xirzec


text:
Consider pulling SasIPRange into Azure.Core as a general IPRange type

See
public readonly struct SasIPRange : IEquatable<SasIPRange> in Azure.Data.Tables.Sas

Ended up not doing this.

authors: christothes pakrym

repo: Azure/azure-sdk-for-net


text:
VisualStudioCredential should be disabled by default on Mac OS

Visual Studio for Mac does not support Azure logins currently. The error messaging could be better here as well.

new fall-through behavior for DAC should make this obsolete


text:
[FEATURE REQ] ManagedIdentityCredential should fail fast when running outside of Azure

Library name
Azure.Identity
Please describe the feature.
When using DefaultAzureCredential outside of Azure, the ManagedIdentityCredential class retries four times before failing. This adds 8 to 10 seconds to token requests. ManagedIdentityCredential should use a heuristic to determine when the code is not running in Azure (e.g., environment variables, network errors, ...), and fail fast.
It is possible to work around this by disabling Managed Identity authentication:
var credential = new DefaultAzureCredential(new DefaultAzureCredentialOptions
{
    ExcludeManagedIdentityCredential = true
});

I do not like this solution as:
a) It is hard to discover -- many users may just assume that token requests are slow
b) It makes code less portable to Azure
c) It is boilerplate code that has to be repeated in each application

Thank you for your feedback.  Tagging and routing to the team member best able to assist.

Hi @jonpayne
We're trying to collect more information about the environments that experience excessive delays due to the ManagedIdentityCredential retry behavior in DefaultAzureCredential. Could you please provide your OS version and version of .NET?

related #24767

@christothes  I ran the code provided by @jonpayne and you can see the results below.
ManagedIdentityCredential is the main culprit when one runs this code from Visual Studio 2022, but VisualStudioCredential can also be really slow when developers are not using Visual Studio 2022 and do dotnet run from the command line (similar times if code is executed from VS Code).
Running from Visual Studio 2022
DefaultAzureCredential.GetToken                     10099.17 ms
EnvironmentCredential.GetToken                          5.40 ms
ManagedIdentityCredential.GetToken                   6128.55 ms
VisualStudioCredential.GetToken                      3880.83 ms

Running from the command line while Visual Studio 2022 was opened)
C:\Users\helder.sousa> dotnet run
DefaultAzureCredential.GetToken                      7921.18 ms
EnvironmentCredential.GetToken                          1.36 ms
ManagedIdentityCredential.GetToken                   6162.71 ms
VisualStudioCredential.GetToken                      1743.74 ms

Running from the command line (Visual Studio 2022 was closed)
C:\Users\helder.sousa> dotnet run
DefaultAzureCredential.GetToken                     16002.06 ms
EnvironmentCredential.GetToken                          1.79 ms
ManagedIdentityCredential.GetToken                   5434.74 ms
VisualStudioCredential.GetToken                      9548.20 ms
VisualStudioCodeCredential.GetToken                     3.20 ms
AzureCliCredential.GetToken                           993.89 ms

Local environment
Windows 10 Enterprise (More system specs in this comment https://github.com/Azure/azure-sdk-for-net/issues/24767#issuecomment-1283153172)
<PackageReference Include="Azure.Identity" Version="1.7.0" />

C:\Users\helder.sousa> dotnet --version
6.0.400

What would be the most ideal solution to this issue with regards to using Authentication=Active Directory Default in a Azure SQL connection string?
Using this eliminates the need for an interceptor, so we do not currently have a place to set the DefaultAzureCredential properties to disable the various Identities that we don't need.
I can confirm that the DefaultAzureCredential.GetToken dependency call is taking 10 seconds most of the time, yet still intermittently. Certainly seems that caching is not working as well.

this really sucks in azure functions because there's no way to override the DefaultAzureCredentialOptions() that AzureComponentFactory leverages to create credentals for a whole slew of various extensions (eventhubs, blobs) so every time it takes liek 10-20 seconds to auth to these services when it should take momennts.
cf https://github.com/Azure/azure-sdk-for-net/blob/af08a035a05b1e3d204cae4939536966dc00d313/sdk/extensions/Microsoft.Extensions.Azure/src/Internal/ClientFactory.cs#L185
I miss the previous libraries ability to put VS credential ahead of managed identity credential.
most devs on my teams are really confused by this delay and do really odd cache wrapper code that ends up being worthless, or they specify environment variables with clientid secret to get client credentials flow ahead of their local identities which is NOT what i want them to be doing.
if we can't fix this at the DefaultAzureCredential level can we at least fix it at the AzureComponentFactory level which has a handle to IServiceProvider so that it could look for a DefaultAzureCredentialsOptions outta the container?

I have a similar problem. Using DefaultAzureCredentialOptions() locally is very slow.
Steps to reproduce:

Login to Azure in VSCode
Assign appropriate roles (SB, SA) on user in Azure
Make calls that use Azure service

The calls take five minutes for uploading to two different Service Bus and Storage accounts. If it runs on our AKS, it is fast. Using connection string for local development is not an option for us. There is also no caching or something like this, the next call takes again five minutes.

this really sucks in azure functions because there's no way to override the DefaultAzureCredentialOptions() that AzureComponentFactory leverages to create credentals for a whole slew of various extensions (eventhubs, blobs)

You should be able to customize the client construction via the ConfigureServices method.

this really sucks in azure functions because there's no way to override the DefaultAzureCredentialOptions() that AzureComponentFactory leverages to create credentals for a whole slew of various extensions (eventhubs, blobs)

You should be able to customize the client construction via the ConfigureServices method.

@christothes not sure if you're suggesting HOW it should work, or suggesting it's already possible.  If it's the latter, look at the code i linked, nothing is coming from DI, the library is just new()ing up the DefaultAzureCredentialOptions in it's execution stack thus no chance to work with injection on it.  also this is being leveraged inside function app, not mvc.

This is how it works today. Sorry, here is a better link that describes the functions: https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference?tabs=blob#configure-an-identity-based-connection . Essentially you should be able to configure any of the credential options via the functions config.

This is how it works today. Sorry, here is a better link that describes the functions integration: https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference?tabs=blob#configure-an-identity-based-connection . Essentially you should be able to configure any of the credential options via the functions config.

Im bot seeing a way to opt our of the managed identity credential without having to specify the client id/secret to use client credentials flow..which is NOT what i want.
is there a __skip_managed_identity option that is not documented?

is there a __skip_managed_identity option that is not documented?

https://github.com/Azure/azure-sdk-for-net/blob/4b8a3621000968bc2f1a2d0a89c8ddc7dfb73efd/sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCredentialOptions.cs#L224

is there a __skip_managed_identity option that is not documented?

https://github.com/Azure/azure-sdk-for-net/blob/4b8a3621000968bc2f1a2d0a89c8ddc7dfb73efd/sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCredentialOptions.cs#L224

yes for sure, but look at my linked code, it new's that up in the method...the question is if there's a config / appsetting host.json setting that assigns to that property to false?
correct me if i'm wrong, but the linked code does NOT retrieve the DefaultAzureCredentialOptions from a DI container, so i have no opportunity to customize it.

You should be able to do this via the UseCredential method:
services.AddAzureClients(builder => builder.UseCredential(new DefaultAzureCredential(options))

You should be able to do this via the UseCredential method:
services.AddAzureClients(builder => builder.UseCredential(new DefaultAzureCredential(options))

have you actually tried this and achieved success?  you keep pointing me to DI, but the code clearly does NOT get anything from a DI container.

You should be able to do this via the UseCredential method:
services.AddAzureClients(builder => builder.UseCredential(new DefaultAzureCredential(options))

have you actually tried this and achieved success? you keep pointing me to DI, but the code clearly does NOT get anything from a DI container.

I'm not sure which code you are referring to - but yes, your functions code would need to use DI to do this.
https://learn.microsoft.com/en-us/azure/azure-functions/functions-dotnet-dependency-injection#register-services

You should be able to do this via the UseCredential method:
services.AddAzureClients(builder => builder.UseCredential(new DefaultAzureCredential(options))

have you actually tried this and achieved success? you keep pointing me to DI, but the code clearly does NOT get anything from a DI container.

I'm not sure which code you are referring to - but yes, your functions code would need to use DI to do this.
https://learn.microsoft.com/en-us/azure/azure-functions/functions-dotnet-dependency-injection#register-services

The code i linked that u originally replied to. Its bot MY code its the code used in azure functions  https://github.com/Azure/azure-sdk-for-net/blob/af08a035a05b1e3d204cae4939536966dc00d313/sdk/extensions/Microsoft.Extensions.Azure/src/Internal/ClientFactory.cs#L185
I had a feeling i was being jerked around here.. :(

@christothes  @drdamour,
Hi guys,
I have also hit this issue when using webjobs locally.   What drdamour pointed out does seem like an issue, as webjobs extensions does use a DefaultAzureCredentialOptoins when if you don't set the web job specific configuration in your appsettings.json (or environment vars).  This seems like a miss to me as they already are checking with their settings if a customer wants to use a managed identity but fail to remove those from the default check later.
What Chirstothes is saying does work around this issue.  If you add the azure client directly with the DI builder (outside of the webjobs builder), web jobs will honor that client instead of creating a new one with the DefaultAzureCredentialsOptions. I think that is the disconnect here in this conversation.

What Chirstothes is saying does work around this issue. If you add the azure client directly with the DI builder (outside of the webjobs builder), web jobs will honor that client instead of creating a new one with the DefaultAzureCredentialsOptions. I think that is the disconnect here in this conversation.

i wish that were true for azure functions extensions.  here's an example path for the eventhub extension:
https://github.com/Azure/azure-sdk-for-net/blob/681153012ad58413e8c584ddc7412efc77958249/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Config/EventHubClientFactory.cs#L212

hey guys,
Also ran into this issue with my customers recently. These customers use our tools outside of Azure and we are soon planning to upgrade to Public Preview, it could be a bit cumbersome to ask our onboarding customers outside of their azure environments to remember to configure this prior of usage, especially because most of our customers will be using transient build machines to run our service. Is there any way of knowing when a permanent fix will be implemented on the library?
Cheers,

I've added the below snippet to our services, which makes the ManagedIdentityCredential fail much faster. Obviously you'll lose the retry functionality. We haven't had any issues because of that (yet? ;) )
    DefaultAzureCredentialOptions.Default.Retry.MaxRetries = 0;
    DefaultAzureCredentialOptions.Default.Retry.Delay = TimeSpan.Zero;

The VisualStudio provider is also very slow, to disable that completely you can remove the TokenProvider in %LOCALAPPDATA%\.IdentityService\AzureServiceAuth\tokenprovider.json -- you will then need to use az login to be able to get a token. Please note that visual studio will add the entry again after a restart...

@bacobart thanks, in my scenario that doesn't work because I want retries for our clients. For now, I'm using an exclusion of the MI validation for the customers who dont credentialize using MI, but like I mentioned before, its cumbersome to explain to hundreds of customers these specific types of scenarios.

I wasn't even able to use the workaround. We configured something like this:
 services.AddAzureClients(builder =>
 {
      builder.UseCredential(new DefaultAzureCredential(
          new DefaultAzureCredentialOptions {
              ExcludeEnvironmentCredential = true,
              ExcludeWorkloadIdentityCredential = true,
              ExcludeManagedIdentityCredential = true,
              ExcludeSharedTokenCacheCredential = true,
              ExcludeVisualStudioCredential = false,
              ExcludeVisualStudioCodeCredential = true,
              ExcludeAzureCliCredential = false,
              ExcludeAzurePowerShellCredential = true,
              ExcludeAzureDeveloperCliCredential = true,
              ExcludeInteractiveBrowserCredential = true,
          }
      ));
      builder.AddBlobServiceClient(new Uri(storageUri));
 });

and it would still try to use Managed Identities and takes ~10 seconds (VS 2022, Windows 11),

In my scenario it took 30 seconds for the DefaultAzureCredential to connect to KeyVault for local development. I moved to AzureCliCredential for local development and now it only takes 2 seconds.

This issue was already impacting my team about a year ago and shockingly I found it is still an issue today as I tried DefaultAzureCredential in a new project.
To unblock my local VS Code dev experience I'm doing something like this:
public static IServiceCollection AddBlobClient(
    this IServiceCollection services,
    IConfiguration configuration,
    IHostEnvironment environment)
{
    var blobServiceUrl = configuration["GameStore:BlobServiceUrl"] ?? throw new Exception("Blob storage connection string is not set");

    TokenCredential credential = environment.IsDevelopment() ? new AzureCliCredential() : new ManagedIdentityCredential();

    services.AddSingleton(new BlobServiceClient(new Uri(blobServiceUrl), credential));

    return services;
}

Hope a proper fix is coming soon!

This should be significantly improved as of 1.11.3 and later.

authors: Cowraider Jaxelr JerryBlake Kiechlus Ro3A bacobart btull89 christothes drdamour heldersousa-planetpayment jonpayne jsquire julioct