Azure / Azure/azure-libraries-for-java
[BUG] CosmosDBAccountsImpl.list() and CosmosDBAccountsImpl.listAsync() methods do not call List Database Accounts REST API
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Java
- Estrellas
- 97
- Forks
- 102
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Describe the bug
The list() and listAsync() APIs for CosmosDB do not call the List all in subscription REST API: https://docs.microsoft.com/en-us/rest/api/cosmos-db-resource-provider/databaseaccounts/list
Instead these methods first call the List all Resource Groups in subscription REST API, then for each Resource Group, it calls List Database Accounts by Resource Group:
https://docs.microsoft.com/en-us/rest/api/resources/resourcegroups/list
This results in a lot of API calls for subscriptions with many resource groups. It is also confusing behavior considering that most other list() and listAsync() APIs in the SDK call the List all in subscription API for the given resource, as opposed to this two-pronged approach where the List all Resource Groups API, then List all in Resource Group APIs are called.
Exception or Stack Trace
N/A
To Reproduce
Call the CosmosDBAccountsImpl.list() or the CosmosDBAccountsImpl.listAsync() method.
Code Snippet
azure.cosmosDBAccounts().list()
azure.cosmosDBAccounts().listAsync()
Expected behavior
The list() and listAsync() SDK methods should call the corresponding List REST API. The typical convention across Azure Resource Manager providers in the SDK is that the list() and listAsync() methods call the corresponding List REST API, which fetches all instances of that resource in a subscription.
Screenshots
N/A
Setup (please complete the following information):
- OS: macOS 10.14.3
- IDE : IntelliJ IDEA 2018.3.5
- Version of the Library used: 1.20.1
Additional context
N/A
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
- Bug Description Added
- Repro Steps Added
- Setup information Added
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Inspecciona CosmosDBAccountsImpl.list() y listAsync(), y compara sus llamadas actuales a grupos de recursos con la List Database Accounts REST API enlazada. Reprodúcelo con azure.cosmosDBAccounts().list() y listAsync(); se considera terminado cuando ambos métodos usan la List API a nivel de suscripción en lugar de enumerar grupos de recursos.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- azure, java
- Área
- api, cloud, databases
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 35/100