From 582fa4bdfa36876769f5c9037db11ca41f13b1a9 Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Tue, 27 Oct 2026 10:18:47 +0000 Subject: [PATCH 1/3] Set standard access mode for Spark Python task acceptance test --- .../run/spark_python_task/databricks.yml.tmpl | 27 +++++++++++++++++++ .../clusters/run/spark_python_task/output.txt | 2 -- .../clusters/run/spark_python_task/script | 1 - .../clusters/run/spark_python_task/test.toml | 2 +- 4 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 acceptance/bundle/resources/clusters/run/spark_python_task/databricks.yml.tmpl diff --git a/acceptance/bundle/resources/clusters/run/spark_python_task/databricks.yml.tmpl b/acceptance/bundle/resources/clusters/run/spark_python_task/databricks.yml.tmpl new file mode 100644 index 00000000000..6dda1ca99e7 --- /dev/null +++ b/acceptance/bundle/resources/clusters/run/spark_python_task/databricks.yml.tmpl @@ -0,0 +1,27 @@ +bundle: + name: test-deploy-cluster-simple + +workspace: + root_path: ~/.bundle/$UNIQUE_NAME + +resources: + clusters: + test_cluster: + cluster_name: test-cluster-$UNIQUE_NAME + spark_version: $DEFAULT_SPARK_VERSION + node_type_id: $NODE_TYPE_ID + instance_pool_id: $TEST_INSTANCE_POOL_ID + num_workers: 2 + # Use standard access mode for the task's workspace-file access. + data_security_mode: USER_ISOLATION + spark_conf: + "spark.executor.memory": "2g" + + jobs: + foo: + name: test-job-with-cluster-$UNIQUE_NAME + tasks: + - task_key: my_spark_python_task + existing_cluster_id: "${resources.clusters.test_cluster.cluster_id}" + spark_python_task: + python_file: ./hello_world.py diff --git a/acceptance/bundle/resources/clusters/run/spark_python_task/output.txt b/acceptance/bundle/resources/clusters/run/spark_python_task/output.txt index b0453085244..6f69b872a5a 100644 --- a/acceptance/bundle/resources/clusters/run/spark_python_task/output.txt +++ b/acceptance/bundle/resources/clusters/run/spark_python_task/output.txt @@ -1,8 +1,6 @@ >>> cp [TESTROOT]/bundle/resources/clusters/run/spark_python_task/../../deploy/simple/hello_world.py . ->>> cp [TESTROOT]/bundle/resources/clusters/run/spark_python_task/../../deploy/simple/databricks.yml.tmpl . - >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files... Created clusters.test_cluster diff --git a/acceptance/bundle/resources/clusters/run/spark_python_task/script b/acceptance/bundle/resources/clusters/run/spark_python_task/script index 708bfaa8213..a65adbf0d2f 100644 --- a/acceptance/bundle/resources/clusters/run/spark_python_task/script +++ b/acceptance/bundle/resources/clusters/run/spark_python_task/script @@ -1,5 +1,4 @@ trace cp $TESTDIR/../../deploy/simple/hello_world.py . -trace cp $TESTDIR/../../deploy/simple/databricks.yml.tmpl . envsubst < databricks.yml.tmpl > databricks.yml cleanup() { diff --git a/acceptance/bundle/resources/clusters/run/spark_python_task/test.toml b/acceptance/bundle/resources/clusters/run/spark_python_task/test.toml index 8c6e5133c82..5ef1880dabc 100644 --- a/acceptance/bundle/resources/clusters/run/spark_python_task/test.toml +++ b/acceptance/bundle/resources/clusters/run/spark_python_task/test.toml @@ -4,8 +4,8 @@ RecordRequests = false RunsOnDbr = true Ignore = [ + ".databricks", "databricks.yml", - "databricks.yml.tmpl", "hello_world.py", ] From 3a5266f55818277195511b611b729064df634882 Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Tue, 27 Oct 2026 10:29:11 +0000 Subject: [PATCH 2/3] Reuse shared cluster template for the access-mode fix --- .../deploy/simple/databricks.yml.tmpl | 1 + .../run/spark_python_task/databricks.yml.tmpl | 27 ------------------- .../clusters/run/spark_python_task/output.txt | 2 ++ .../clusters/run/spark_python_task/script | 1 + .../clusters/run/spark_python_task/test.toml | 1 + 5 files changed, 5 insertions(+), 27 deletions(-) delete mode 100644 acceptance/bundle/resources/clusters/run/spark_python_task/databricks.yml.tmpl diff --git a/acceptance/bundle/resources/clusters/deploy/simple/databricks.yml.tmpl b/acceptance/bundle/resources/clusters/deploy/simple/databricks.yml.tmpl index 27ce766f1c6..3cf56ca8cd7 100644 --- a/acceptance/bundle/resources/clusters/deploy/simple/databricks.yml.tmpl +++ b/acceptance/bundle/resources/clusters/deploy/simple/databricks.yml.tmpl @@ -12,6 +12,7 @@ resources: node_type_id: $NODE_TYPE_ID instance_pool_id: $TEST_INSTANCE_POOL_ID num_workers: 2 + data_security_mode: USER_ISOLATION spark_conf: "spark.executor.memory": "2g" diff --git a/acceptance/bundle/resources/clusters/run/spark_python_task/databricks.yml.tmpl b/acceptance/bundle/resources/clusters/run/spark_python_task/databricks.yml.tmpl deleted file mode 100644 index 6dda1ca99e7..00000000000 --- a/acceptance/bundle/resources/clusters/run/spark_python_task/databricks.yml.tmpl +++ /dev/null @@ -1,27 +0,0 @@ -bundle: - name: test-deploy-cluster-simple - -workspace: - root_path: ~/.bundle/$UNIQUE_NAME - -resources: - clusters: - test_cluster: - cluster_name: test-cluster-$UNIQUE_NAME - spark_version: $DEFAULT_SPARK_VERSION - node_type_id: $NODE_TYPE_ID - instance_pool_id: $TEST_INSTANCE_POOL_ID - num_workers: 2 - # Use standard access mode for the task's workspace-file access. - data_security_mode: USER_ISOLATION - spark_conf: - "spark.executor.memory": "2g" - - jobs: - foo: - name: test-job-with-cluster-$UNIQUE_NAME - tasks: - - task_key: my_spark_python_task - existing_cluster_id: "${resources.clusters.test_cluster.cluster_id}" - spark_python_task: - python_file: ./hello_world.py diff --git a/acceptance/bundle/resources/clusters/run/spark_python_task/output.txt b/acceptance/bundle/resources/clusters/run/spark_python_task/output.txt index 6f69b872a5a..b0453085244 100644 --- a/acceptance/bundle/resources/clusters/run/spark_python_task/output.txt +++ b/acceptance/bundle/resources/clusters/run/spark_python_task/output.txt @@ -1,6 +1,8 @@ >>> cp [TESTROOT]/bundle/resources/clusters/run/spark_python_task/../../deploy/simple/hello_world.py . +>>> cp [TESTROOT]/bundle/resources/clusters/run/spark_python_task/../../deploy/simple/databricks.yml.tmpl . + >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files... Created clusters.test_cluster diff --git a/acceptance/bundle/resources/clusters/run/spark_python_task/script b/acceptance/bundle/resources/clusters/run/spark_python_task/script index a65adbf0d2f..708bfaa8213 100644 --- a/acceptance/bundle/resources/clusters/run/spark_python_task/script +++ b/acceptance/bundle/resources/clusters/run/spark_python_task/script @@ -1,4 +1,5 @@ trace cp $TESTDIR/../../deploy/simple/hello_world.py . +trace cp $TESTDIR/../../deploy/simple/databricks.yml.tmpl . envsubst < databricks.yml.tmpl > databricks.yml cleanup() { diff --git a/acceptance/bundle/resources/clusters/run/spark_python_task/test.toml b/acceptance/bundle/resources/clusters/run/spark_python_task/test.toml index 5ef1880dabc..7ca7b0717a2 100644 --- a/acceptance/bundle/resources/clusters/run/spark_python_task/test.toml +++ b/acceptance/bundle/resources/clusters/run/spark_python_task/test.toml @@ -6,6 +6,7 @@ RunsOnDbr = true Ignore = [ ".databricks", "databricks.yml", + "databricks.yml.tmpl", "hello_world.py", ] From 87e25b108c15ac6cd05ac160d600db84105f9fa7 Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Tue, 27 Oct 2026 11:08:40 +0000 Subject: [PATCH 3/3] Keep Spark access-mode fix to a single configuration line --- .../bundle/resources/clusters/run/spark_python_task/test.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/acceptance/bundle/resources/clusters/run/spark_python_task/test.toml b/acceptance/bundle/resources/clusters/run/spark_python_task/test.toml index 7ca7b0717a2..8c6e5133c82 100644 --- a/acceptance/bundle/resources/clusters/run/spark_python_task/test.toml +++ b/acceptance/bundle/resources/clusters/run/spark_python_task/test.toml @@ -4,7 +4,6 @@ RecordRequests = false RunsOnDbr = true Ignore = [ - ".databricks", "databricks.yml", "databricks.yml.tmpl", "hello_world.py",