Skip to content

Commit 45e3650

Browse files
Add verbose mode for bricks sync (#234)
<img width="1728" alt="Screenshot 2022-11-18 at 11 38 18" src="https://user-images.githubusercontent.com/88345179/202684309-8cee5fec-29ac-43f4-ab4d-349ef1c2f5e3.png">
1 parent 3dbaac6 commit 45e3650

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

packages/databricks-vscode/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,11 @@
502502
"type": "boolean",
503503
"default": false,
504504
"description": "Enable/disable filtering for only accessible clusters (clusters on which the current user can run code)"
505+
},
506+
"databricks.bricks.verboseMode": {
507+
"type": "boolean",
508+
"default": false,
509+
"description": "Enable verbose logging for bricks CLI (sync mode)."
505510
}
506511
}
507512
}

packages/databricks-vscode/src/WorkspaceConfigs.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,11 @@ export const workspaceConfigs = {
3636
?.get<boolean>("clusters.onlyShowAccessibleClusters") ?? false
3737
);
3838
},
39+
get bricksVerboseMode() {
40+
return (
41+
workspace
42+
.getConfiguration("databricks")
43+
?.get<boolean>("bricks.verboseMode") ?? false
44+
);
45+
},
3946
};

packages/databricks-vscode/src/cli/CliWrapper.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {spawn} from "child_process";
22
import {ExtensionContext} from "vscode";
33
import {SyncDestination} from "../configuration/SyncDestination";
4+
import {workspaceConfigs} from "../WorkspaceConfigs";
45

56
export interface Command {
67
command: string;
@@ -40,6 +41,9 @@ export class CliWrapper {
4041
if (syncType === "full") {
4142
args.push("--persist-snapshot=false");
4243
}
44+
if (workspaceConfigs.bricksVerboseMode) {
45+
args.push("-v");
46+
}
4347
return {command, args};
4448
}
4549

0 commit comments

Comments
 (0)