databricks-sdk-py
databricks-sdk-py copied to clipboard
[ISSUE] Missing required enable_serverless_compute parameter
Description
When I call set_workspace_warehouse_config method from the WarehousesAPI, I get an exception
databricks.sdk.core.DatabricksError: enable_serverless_compute is required. But this parameter is not available for the method.
Reproduction
from databricks.sdk import WorkspaceClient
from databricks.sdk.service.sql import SetWorkspaceWarehouseConfigRequestSecurityPolicy
client = WorkspaceClient()
warehouse_setting = client.warehouses.get_workspace_warehouse_config()
client.warehouses.set_workspace_warehouse_config(
channel=warehouse_setting.channel,
config_param=warehouse_setting.config_param,
data_access_config=warehouse_setting.data_access_config,
enabled_warehouse_types=warehouse_setting.enabled_warehouse_types,
global_param=warehouse_setting.global_param,
google_service_account=warehouse_setting.google_service_account,
instance_profile_arn=warehouse_setting.instance_profile_arn,
security_policy=SetWorkspaceWarehouseConfigRequestSecurityPolicy(warehouse_setting.security_policy.value),
sql_configuration_parameters=warehouse_setting.sql_configuration_parameters,
)
Expected behavior
Required parameter enable_serverless_compute should be an available argument of the set_workspace_warehouse_config method
Other Information
- Version: 0.6.0
Same issue:
Disregard the commit - noticed this is auto-generated from the OpenAPI specs: "# Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT."
The specs need to be updated to have this parameter until the requirement is removed.
Thank you for filing this. I've reproduced this and have the following debug logs:
DEBUG:urllib3.connectionpool:https://<REDACTED>.cloud.databricks.com:443 "GET /api/2.0/sql/config/warehouses HTTP/1.1" 200 None
DEBUG:databricks.sdk:GET /api/2.0/sql/config/warehouses
< 200 OK
< {
< "enable_serverless_compute": false,
< "enabled_warehouse_types": [
< {
< "enabled": true,
< "warehouse_type": "CLASSIC"
< },
< {
< "enabled": true,
< "warehouse_type": "PRO"
< }
< ],
< "security_policy": "DATA_ACCESS_CONTROL"
< }
DEBUG:urllib3.connectionpool:https://<REDACTED>.cloud.databricks.com:443 "PUT /api/2.0/sql/config/warehouses HTTP/1.1" 400 None
DEBUG:databricks.sdk:PUT /api/2.0/sql/config/warehouses
> {
> "enabled_warehouse_types": [
> {
> "enabled": true,
> "warehouse_type": "CLASSIC"
> },
> {
> "enabled": true,
> "warehouse_type": "PRO"
> }
> ],
> "security_policy": "DATA_ACCESS_CONTROL"
> }
< 400 Bad Request
< {
< "error_code": "INVALID_PARAMETER_VALUE",
< "message": "enable_serverless_compute is required."
< }
After discussions with the team, it seems like this is an issue with the internal API specification of this endpoint. This parameter is required for customers who are able to use Serverless, but it is not included in our public API definition. We are currently discussing whether to expose this parameter in the API definition or make it optional. cc @mehmetcankurt @mengqiu-teng
I still receive this DatabricksError in version 0.11.0. What is the current expected time for a solution and/or is there a possible workaround?
Is there a workaround?
Does the parameter actually do anything? What does it mean to set the enable_serverless_compute on the workspace wide warehouse configuration?
UPDATE: If you set it to "false" the following appears in the workspace SQL warehouse configuration in the UI: