Set default data_security_mode to "SINGLE_USER" in bundle templates (#2372)

## Changes
1. Change the **default-python** bundle template to set
`data_security_mode` of a cluster to SINGLE_USER
2. Change the **experimental-jobs-as-code** bundle template to set
`data_security_mode` of a cluster to SINGLE_USER

## Why
Explicitly adding this field saves experienced users from confusion onto
what security mode is applied to the cluster

## Tests
Changed existing unit and integration tests to pass with this change
This commit is contained in:
Anton Nekipelov 2025-02-26 13:19:38 +01:00 committed by GitHub
parent 9659f91c9f
commit 428e730c9e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 6 additions and 0 deletions

View File

@ -44,6 +44,7 @@ resources:
new_cluster:
spark_version: 15.4.x-scala2.12
node_type_id: i3.xlarge
data_security_mode: SINGLE_USER
autoscale:
min_workers: 1
max_workers: 4

View File

@ -34,6 +34,7 @@ Warning: Ignoring Databricks CLI version constraint for development build. Requi
"max_workers": 4,
"min_workers": 1
},
"data_security_mode": "SINGLE_USER",
"node_type_id": "i3.xlarge",
"spark_version": "15.4.x-scala2.12"
}

View File

@ -56,6 +56,7 @@ my_jobs_as_code_job = Job.from_dict(
"new_cluster": {
"spark_version": "15.4.x-scala2.12",
"node_type_id": "i3.xlarge",
"data_security_mode": "SINGLE_USER",
"autoscale": {
"min_workers": 1,
"max_workers": 4,

View File

@ -82,6 +82,7 @@
"max_workers": 4,
"min_workers": 1
},
"data_security_mode": "SINGLE_USER",
"node_type_id": "i3.xlarge",
"spark_version": "15.4.x-scala2.12"
}

View File

@ -69,6 +69,7 @@ resources:
new_cluster:
spark_version: {{template "latest_lts_dbr_version"}}
node_type_id: {{smallest_node_type}}
data_security_mode: SINGLE_USER
autoscale:
min_workers: 1
max_workers: 4

View File

@ -97,6 +97,7 @@ This job runs {{.project_name}}_pipeline on a schedule.
"new_cluster": {
"spark_version": "{{template "latest_lts_dbr_version"}}",
"node_type_id": "{{smallest_node_type}}",
"data_security_mode": "SINGLE_USER",
"autoscale": {
"min_workers": 1,
"max_workers": 4,