Skip to content

Commit

Permalink
Use cluster policy in pipeline tests (#1440)
Browse files Browse the repository at this point in the history
## 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
  • Loading branch information
ilia-db authored Nov 7, 2024
1 parent bc0d488 commit 5ba42f7
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
14 changes: 13 additions & 1 deletion packages/databricks-vscode/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"name": "Run and Watch Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
Expand All @@ -17,6 +17,18 @@
"EXTENSION_DEVELOPMENT": "true"
}
},
{
"name": "Build and Run Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"preLaunchTask": "NPM build",
"env": {
"DATABRICKS_DEBUG_HEADERS": "false",
"EXTENSION_DEVELOPMENT": "true"
}
},
{
"name": "Extension Tests",
"type": "extensionHost",
Expand Down
9 changes: 9 additions & 0 deletions packages/databricks-vscode/.vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
"group": "watchers"
}
},
{
"label": "NPM build",
"type": "npm",
"script": "build",
"presentation": {
"reveal": "always",
"group": "build"
}
},
{
"label": "Build",
"dependsOn": ["NPM watch"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ describe("Deploy and run pipeline", async function () {
resourceExplorerView,
"Pipelines",
pipelineName,
// TODO: the account we are using to run tests doesn't have permissions to create clusters for the pipelines
"Failed",
"Completed",
// Long timeout, as the pipeline will be waiting for its cluster to start
15 * 60 * 1000
);
Expand Down
7 changes: 7 additions & 0 deletions packages/databricks-vscode/src/test/e2e/utils/dabsFixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,13 @@ export async function createProjectWithPipeline(vscodeWorkspaceRoot: string) {
vscode_integration_test: {
name: pipelineName,
target: "vscode_integration_test",
clusters: [
{
label: "default",
policy_id: "001196FD671F30D0",
apply_policy_default_values: true,
},
],
libraries: [
{
notebook: {
Expand Down

0 comments on commit 5ba42f7

Please sign in to comment.