Hello! I've recently faced with deadlock in azure-core aio library. It seems, that here https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/azure/core/pipeline/policies/_authentication_async.py#L24 must be asyncio.Lock. Why is threading.Lock used there?
I see you opened an issue Azure/azure-sdk-for-python#11543, thanks for that :). We confirm it and Charles is working on it. Should be released part of azure-core 1.6.0 next week
offer_throughput
parameter here:@lmazuel I noticed on S.O. you mentioned that one can use the client to provide the serializer and deserializer arguments for instantiating in the python sdk. Do you have any guidance or references on how to do that?
code:databricks_operations = WorkspacesOperations(client_obj.client)
Output:TypeError: __init__() missing 3 required positional arguments: 'config', 'serializer', and 'deserializer'
workspaces
is an instance of WorkspacesOperations
attached to the client
client.workspaces.create_or_update
workspaces
is an instance of WorkspacesOperations
that client.workspaces.create_or_update
(not found in online searches) is the same as azure.mgmt.databricks.operations.WorkspacesOperations.create_or_update
(found here: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-mgmt-databricks/0.1.0/azure.mgmt.databricks.operations.html#azure.mgmt.databricks.operations.WorkspacesOperations). If so, these docs indicate that the first argument required for create_or_update
is parameters
. This parameters
argument is not clear to me. It appears to be an instance of azure.mgmt.databricks.models.workspace
. But that can't be since this method is actually where I create a workspace, no? Do you have any input on what to provide for parameters
? Thank you very much!
Workspace
instance, and provide it as parameter. https://azuresdkdocs.blob.core.windows.net/$web/python/azure-mgmt-databricks/0.1.0/azure.mgmt.databricks.models.html#azure.mgmt.databricks.models.WorkspaceWorkspaceParameters
. The two required parameters are location
and managed_resource_group_id
. For instance Workspace(location='westus', managed_resource_group_id='put your id')
@lmazuel I received an answer from Microsoft engineers, in case you're interested:
"...neither the Python SDK nor the REST API support the creation of Azure Databricks services / workspaces at this time.
You can create an Azure Databricks workspace by using an ARM template. This is a JSON file that defines the infrastructure and configuration for your project.
You can deploy resources with ARM templates and Resource Manager REST API https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-rest
You can also deploy an ARM template is by using one of the following options
o Install Azure PowerShell
o Install Azure CLI on Windows / Linux or macOS.
Documentation on these two options can be found here https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-tutorial-create-first-template?tabs=azure-powershell#command-line-deployment"
client.workspaces.create_or_update(
{
"managed_resource_group_id": "<subscritpion_id_to_replace>/resourceGroups/"+managedResourceGroupName,
"sku": {"name":"premium"},
"location":"westus"
},
resource_group_name,
workspace_name
).wait() # wait for completion