diff --git a/internal/bundle/bundles/python_wheel_task/databricks_template_schema.json b/internal/bundle/bundles/python_wheel_task/databricks_template_schema.json index b39a628c..f7f4b634 100644 --- a/internal/bundle/bundles/python_wheel_task/databricks_template_schema.json +++ b/internal/bundle/bundles/python_wheel_task/databricks_template_schema.json @@ -12,6 +12,10 @@ "node_type_id": { "type": "string", "description": "Node type id for job cluster" + }, + "unique_id": { + "type": "string", + "description": "Unique ID for job name" } } } diff --git a/internal/bundle/bundles/python_wheel_task/template/databricks.yml.tmpl b/internal/bundle/bundles/python_wheel_task/template/databricks.yml.tmpl index 4386879a..a3201e03 100644 --- a/internal/bundle/bundles/python_wheel_task/template/databricks.yml.tmpl +++ b/internal/bundle/bundles/python_wheel_task/template/databricks.yml.tmpl @@ -4,7 +4,7 @@ bundle: resources: jobs: some_other_job: - name: "[${bundle.target}] Test Wheel Job" + name: "[${bundle.target}] Test Wheel Job {{.unique_id}}" tasks: - task_key: TestTask new_cluster: diff --git a/internal/bundle/python_wheel_test.go b/internal/bundle/python_wheel_test.go index 52683edc..ee5d897d 100644 --- a/internal/bundle/python_wheel_test.go +++ b/internal/bundle/python_wheel_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/databricks/cli/internal" + "github.com/google/uuid" "github.com/stretchr/testify/require" ) @@ -22,6 +23,7 @@ func TestAccPythonWheelTaskDeployAndRun(t *testing.T) { bundleRoot, err := initTestTemplate(t, "python_wheel_task", map[string]any{ "node_type_id": nodeTypeId, + "unique_id": uuid.New().String(), "spark_version": "13.2.x-snapshot-scala2.12", }) require.NoError(t, err)