Skip to content

Commit 5ba42f7

Browse files
authored
Use cluster policy in pipeline tests (#1440)
## Changes I've created a simple cluster policy in our terraform infra to let the test user create clusters for pipelines. Also added non-watch build targets, can be useful when you want to re-run all our preparation scripts before starting the extension ## Tests e2e
1 parent bc0d488 commit 5ba42f7

File tree

4 files changed

+30
-3
lines changed

4 files changed

+30
-3
lines changed

packages/databricks-vscode/.vscode/launch.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"version": "0.2.0",
77
"configurations": [
88
{
9-
"name": "Run Extension",
9+
"name": "Run and Watch Extension",
1010
"type": "extensionHost",
1111
"request": "launch",
1212
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
@@ -17,6 +17,18 @@
1717
"EXTENSION_DEVELOPMENT": "true"
1818
}
1919
},
20+
{
21+
"name": "Build and Run Extension",
22+
"type": "extensionHost",
23+
"request": "launch",
24+
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
25+
"outFiles": ["${workspaceFolder}/out/**/*.js"],
26+
"preLaunchTask": "NPM build",
27+
"env": {
28+
"DATABRICKS_DEBUG_HEADERS": "false",
29+
"EXTENSION_DEVELOPMENT": "true"
30+
}
31+
},
2032
{
2133
"name": "Extension Tests",
2234
"type": "extensionHost",

packages/databricks-vscode/.vscode/tasks.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@
2020
"group": "watchers"
2121
}
2222
},
23+
{
24+
"label": "NPM build",
25+
"type": "npm",
26+
"script": "build",
27+
"presentation": {
28+
"reveal": "always",
29+
"group": "build"
30+
}
31+
},
2332
{
2433
"label": "Build",
2534
"dependsOn": ["NPM watch"],

packages/databricks-vscode/src/test/e2e/deploy_and_run_pipeline.e2e.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ describe("Deploy and run pipeline", async function () {
8686
resourceExplorerView,
8787
"Pipelines",
8888
pipelineName,
89-
// TODO: the account we are using to run tests doesn't have permissions to create clusters for the pipelines
90-
"Failed",
89+
"Completed",
9190
// Long timeout, as the pipeline will be waiting for its cluster to start
9291
15 * 60 * 1000
9392
);

packages/databricks-vscode/src/test/e2e/utils/dabsFixtures.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,13 @@ export async function createProjectWithPipeline(vscodeWorkspaceRoot: string) {
183183
vscode_integration_test: {
184184
name: pipelineName,
185185
target: "vscode_integration_test",
186+
clusters: [
187+
{
188+
label: "default",
189+
policy_id: "001196FD671F30D0",
190+
apply_policy_default_values: true,
191+
},
192+
],
186193
libraries: [
187194
{
188195
notebook: {

0 commit comments

Comments
 (0)