databricks-cli icon indicating copy to clipboard operation
databricks-cli copied to clipboard

"policy_id" not supported when creating a new cluster

Open anoj-9771 opened this issue 3 years ago • 1 comments

It seems that "policy_id" is not supported when setting up a new cluster. A raw API call to api/2.0/clusters/create works with the below config:

{ "cluster_name": "dev-cluster", "spark_version": "8.4.x-scala2.12", "node_type_id": "Standard_DS3_v2", "spark_conf": { "spark.speculation": true }, "autoscale" : { "min_workers": 2, "max_workers": 10 }, "autotermination_minutes": 45, "policy_id": "A661B01246000002" }

However the same config can't be used in databricks-cli. The error I get is edit_cluster() got an unexpected keyword argument 'policy_id'.

anoj-9771 avatar Dec 21 '21 01:12 anoj-9771

I tested above with databricks-cli 0.15.0 and then also with databricks-cli 0.16.2 (latest version as of now). Suspecting that the policy_id attribute was supported by databricks API at a later date and hence databricks-cli hasn't been updated?

Reference to databricks clusters API: https://docs.databricks.com/dev-tools/api/latest/clusters.html

anoj-9771 avatar Dec 21 '21 01:12 anoj-9771