Generate unique name for a job in Python wheel test (#745)

## Changes
Generate unique name for a job in Python wheel test
This commit is contained in:
Andrew Nester 2023-09-07 22:02:26 +02:00 committed by GitHub
parent 1a7bf4e4f1
commit 5a14c7cb43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View File

@ -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"
}
}
}

View File

@ -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:

View File

@ -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)