azure-cosmos not able to disable "endpoint_discovery" #21750
Labels
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
Client
This issue points to a problem in the data-plane of the library.
Cosmos
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
Describe the bug
"enable_endpoint_discovery" can't set to False at Cosmos_Client.py (line 82):
policy.EnableEndpointDiscovery = kwargs.pop('enable_endpoint_discovery', None) or policy.EnableEndpointDiscovery
Even specifically set the value to False, this code will alway use the default value which is True.
To Reproduce
Steps to reproduce the behavior:
1.
cosmos_client = CosmosClient( url="https://accountname.documents.azure.com:443", credential="account_key", enable_endpoint_discovery=False )
Expected behavior
Disable endpoint discovery
Screenshots
Additional context
I don't need account discovery, the discovery change the url to something like:
accountname-[region_name].documents.azure.com
which in my environment is not a valid domain name, so I get error:
azure.core.exceptions.ServiceRequestError: <urllib3.connection.HTTPSConnection object at 0x0000029C0E3B0588>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed
The text was updated successfully, but these errors were encountered: