Skip to content

Commit ec7c659

Browse files
authored
Default to DATA_SECURITY_MODE_AUTO in bundle templates (#5452)
## Changes The default `data_security_mode` for job clusters created by the bundle templates is now `DATA_SECURITY_MODE_AUTO`. With Auto, the access mode is selected automatically: Standard by default, and Dedicated when the cluster configuration requires it (for example ML Runtime, GPUs, R, Databricks Container Services, or global init scripts). See [Access modes](https://docs.databricks.com/aws/en/compute/configure#access-modes). ## Why Auto selects an access mode that works across the broadest set of configurations without the user having to pick one. The job definition stores and returns `auto` verbatim; the access mode is resolved per run when the job cluster launches, and that resolved value is never written back to the job — so bundles see no drift. ## Tests - Acceptance tests updated and passing for both deploy engines. - Deployed against a production workspace on both engines and confirmed the value round-trips as `DATA_SECURITY_MODE_AUTO` with no drift, and that Auto resolves to a concrete access mode at cluster launch. - Manually verified the dbt-sql template's classic (non-serverless) job cluster by deploying and running the job: Auto round-trips and resolves correctly and the run completes. This pull request and its description were written by Isaac.
1 parent ee04cae commit ec7c659

22 files changed

Lines changed: 25 additions & 24 deletions

NEXT_CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
### CLI
88

99
### Bundles
10+
* Set the default `data_security_mode` to `DATA_SECURITY_MODE_AUTO` in bundle templates ([#5452](https://github.com/databricks/cli/pull/5452)).
1011

1112
### Dependency updates
1213

acceptance/bundle/migrate/default-python/out.plan_after_deploy.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"max_workers": 4,
2929
"min_workers": 1
3030
},
31-
"data_security_mode": "SINGLE_USER",
31+
"data_security_mode": "DATA_SECURITY_MODE_AUTO",
3232
"node_type_id": "[NODE_TYPE_ID]",
3333
"spark_version": "16.4.x-scala2.12"
3434
}
@@ -128,7 +128,7 @@
128128
"max_workers": 4,
129129
"min_workers": 1
130130
},
131-
"data_security_mode": "SINGLE_USER",
131+
"data_security_mode": "DATA_SECURITY_MODE_AUTO",
132132
"node_type_id": "[NODE_TYPE_ID]",
133133
"spark_version": "16.4.x-scala2.12"
134134
}

acceptance/bundle/migrate/default-python/out.plan_after_migration.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"max_workers": 4,
2929
"min_workers": 1
3030
},
31-
"data_security_mode": "SINGLE_USER",
31+
"data_security_mode": "DATA_SECURITY_MODE_AUTO",
3232
"node_type_id": "[NODE_TYPE_ID]",
3333
"spark_version": "16.4.x-scala2.12"
3434
}
@@ -128,7 +128,7 @@
128128
"max_workers": 4,
129129
"min_workers": 1
130130
},
131-
"data_security_mode": "SINGLE_USER",
131+
"data_security_mode": "DATA_SECURITY_MODE_AUTO",
132132
"node_type_id": "[NODE_TYPE_ID]",
133133
"spark_version": "16.4.x-scala2.12"
134134
}

acceptance/bundle/migrate/default-python/out.state_after_migration.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"max_workers": 4,
2222
"min_workers": 1
2323
},
24-
"data_security_mode": "SINGLE_USER",
24+
"data_security_mode": "DATA_SECURITY_MODE_AUTO",
2525
"node_type_id": "[NODE_TYPE_ID]",
2626
"spark_version": "16.4.x-scala2.12"
2727
}

acceptance/bundle/migrate/default-python/out.state_original.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"cluster_mount_info": [],
6666
"cluster_name": "",
6767
"custom_tags": null,
68-
"data_security_mode": "SINGLE_USER",
68+
"data_security_mode": "DATA_SECURITY_MODE_AUTO",
6969
"docker_image": [],
7070
"driver_instance_pool_id": "",
7171
"driver_node_type_flexibility": [],

acceptance/bundle/templates/default-python/classic/out.compare-vs-serverless.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
+ new_cluster:
6363
+ spark_version: 16.4.x-scala2.12
6464
+ node_type_id: [NODE_TYPE_ID]
65-
+ data_security_mode: SINGLE_USER
65+
+ data_security_mode: DATA_SECURITY_MODE_AUTO
6666
+ autoscale:
6767
+ min_workers: 1
6868
+ max_workers: 4

acceptance/bundle/templates/default-python/classic/out.plan_after_deploy_dev.direct.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"max_workers": 4,
2929
"min_workers": 1
3030
},
31-
"data_security_mode": "SINGLE_USER",
31+
"data_security_mode": "DATA_SECURITY_MODE_AUTO",
3232
"node_type_id": "[NODE_TYPE_ID]",
3333
"spark_version": "16.4.x-scala2.12"
3434
}
@@ -128,7 +128,7 @@
128128
"max_workers": 4,
129129
"min_workers": 1
130130
},
131-
"data_security_mode": "SINGLE_USER",
131+
"data_security_mode": "DATA_SECURITY_MODE_AUTO",
132132
"node_type_id": "[NODE_TYPE_ID]",
133133
"spark_version": "16.4.x-scala2.12"
134134
}

acceptance/bundle/templates/default-python/classic/out.plan_after_deploy_prod.direct.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"max_workers": 4,
3131
"min_workers": 1
3232
},
33-
"data_security_mode": "SINGLE_USER",
33+
"data_security_mode": "DATA_SECURITY_MODE_AUTO",
3434
"node_type_id": "[NODE_TYPE_ID]",
3535
"spark_version": "16.4.x-scala2.12"
3636
}

acceptance/bundle/templates/default-python/classic/out.plan_dev.direct.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"max_workers": 4,
2727
"min_workers": 1
2828
},
29-
"data_security_mode": "SINGLE_USER",
29+
"data_security_mode": "DATA_SECURITY_MODE_AUTO",
3030
"node_type_id": "[NODE_TYPE_ID]",
3131
"spark_version": "16.4.x-scala2.12"
3232
}

acceptance/bundle/templates/default-python/classic/out.plan_prod.direct.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"max_workers": 4,
2727
"min_workers": 1
2828
},
29-
"data_security_mode": "SINGLE_USER",
29+
"data_security_mode": "DATA_SECURITY_MODE_AUTO",
3030
"node_type_id": "[NODE_TYPE_ID]",
3131
"spark_version": "16.4.x-scala2.12"
3232
}

0 commit comments

Comments
 (0)