@fabricorg/databricks-testkit 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +21 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1412,6 +1412,9 @@ function classicComputeCheck() {
|
|
|
1412
1412
|
env.DBX_TEST_CLASSIC_SPARK_VERSION && env.DBX_TEST_CLASSIC_NODE_TYPE && env.DBX_TEST_NOTEBOOK_PATH
|
|
1413
1413
|
),
|
|
1414
1414
|
async run({ env, client }) {
|
|
1415
|
+
const numWorkers = Number(env.DBX_TEST_CLASSIC_WORKERS ?? 1);
|
|
1416
|
+
const alternateNodeTypes = (env.DBX_TEST_CLASSIC_ALTERNATE_NODE_TYPES ?? "").split(",").map((value) => value.trim()).filter(Boolean);
|
|
1417
|
+
const singleNode = numWorkers === 0;
|
|
1415
1418
|
const submitted = await client.post("/api/2.1/jobs/runs/submit", {
|
|
1416
1419
|
run_name: `fabric-experiments-classic-certification-${Date.now()}`,
|
|
1417
1420
|
tasks: [
|
|
@@ -1420,9 +1423,24 @@ function classicComputeCheck() {
|
|
|
1420
1423
|
new_cluster: {
|
|
1421
1424
|
spark_version: env.DBX_TEST_CLASSIC_SPARK_VERSION,
|
|
1422
1425
|
node_type_id: env.DBX_TEST_CLASSIC_NODE_TYPE,
|
|
1423
|
-
num_workers:
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
+
num_workers: numWorkers,
|
|
1427
|
+
data_security_mode: env.DBX_TEST_CLASSIC_SECURITY_MODE ?? "SINGLE_USER",
|
|
1428
|
+
...env.DBX_TEST_CLASSIC_SINGLE_USER_NAME ? { single_user_name: env.DBX_TEST_CLASSIC_SINGLE_USER_NAME } : {},
|
|
1429
|
+
...singleNode ? {
|
|
1430
|
+
spark_conf: {
|
|
1431
|
+
"spark.databricks.cluster.profile": "singleNode",
|
|
1432
|
+
"spark.master": "local[*]"
|
|
1433
|
+
},
|
|
1434
|
+
custom_tags: { ResourceClass: "SingleNode" }
|
|
1435
|
+
} : {},
|
|
1436
|
+
...alternateNodeTypes.length ? {
|
|
1437
|
+
worker_node_type_flexibility: {
|
|
1438
|
+
alternate_node_type_ids: alternateNodeTypes
|
|
1439
|
+
},
|
|
1440
|
+
driver_node_type_flexibility: {
|
|
1441
|
+
alternate_node_type_ids: alternateNodeTypes
|
|
1442
|
+
}
|
|
1443
|
+
} : {}
|
|
1426
1444
|
},
|
|
1427
1445
|
notebook_task: { notebook_path: env.DBX_TEST_NOTEBOOK_PATH }
|
|
1428
1446
|
}
|