Skip to content

Commit

Permalink
fixed bug with Buffer introduced in v2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
gbrueckl committed Mar 30, 2023
1 parent 8e10de1 commit 98b5880
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Release Notes

**v2.0.3:**
- fixed bug with `Buffer` introduced in `v2.0.2`

**v2.0.2:**
- some more preparations and debugging for upcoming CORS implementation
- added support for `Buffer` in web extension
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "databricks-vscode",
"displayName": "Databricks Power Tools",
"description": "Run notebooks cell-by-cell, browse and edit your Databricks Workspace, DBFS, Clusters, Jobs, Secrets, Repos and SQL. Supports Azure Databricks, Databricks on AWS and Databricks on GCP.",
"version": "2.0.2",
"version": "2.0.3",
"publisher": "paiqo",
"icon": "resources/databricks_extension.png",
"author": {
Expand Down Expand Up @@ -867,7 +867,7 @@
},
{
"command": "databricksConnections.add",
"when": "view == databricksConnections && virtualWorkspace && paiqo.databricks.connectionManager == 'Manual'",
"when": "view == databricksConnections && virtualWorkspace",
"group": "navigation"
},
{
Expand Down
6 changes: 5 additions & 1 deletion src/ThisExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ export abstract class ThisExtension {
// handle default
if (conManager == "Default") {
ThisExtension.log("Default connection manager selected. Trying to find the best connection manager ...")
if (vscode.extensions.getExtension("databricks.databricks")) {
if(ThisExtension.isInBrowser) {
ThisExtension.log("Using Manual connection manager as its the only one currently available in the browser ...");
conManager = "Manual";
}
else if (vscode.extensions.getExtension("databricks.databricks")) {
ThisExtension.log("Databricks Extension found. Using it as connection manager ...");
conManager = "Databricks Extension";
}
Expand Down
4 changes: 3 additions & 1 deletion src/env/node/buffer.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export { Buffer };
const Buffer_Node = Buffer;

export { Buffer_Node as Buffer };
9 changes: 7 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,13 @@ export async function activate(context: vscode.ExtensionContext) {

let isValidated: boolean = await ThisExtension.initialize(context);
if (isValidated === false) {
ThisExtension.log("Issue initializing extension - Please update Databricks settings and restart VSCode!");
vscode.window.showErrorMessage("Issue initializing extension - Please update Databricks settings and restart VSCode!");
const msg = "Issue initializing extension - Please update Databricks settings and restart VSCode!"
ThisExtension.log(msg);
vscode.window.showErrorMessage(msg);

ThisExtension.setStatusBar("ERROR!");

throw new Error(msg);
}

ThisExtension.setStatusBar("Initialized!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export class DatabricksConnectionManagerManualInput extends DatabricksConnection
let msg: string = "No connections have been configured yet! Please add a connection manually before proceeding!";
ThisExtension.log(msg);
vscode.window.showErrorMessage(msg);

throw new Error(msg);
}
else {
await super.manageLastActiveConnection();
Expand Down

0 comments on commit 98b5880

Please sign in to comment.