Skip to content

Commit

Permalink
v1.1.1
Browse files Browse the repository at this point in the history
fix issue with order of connection setup and commands bein gexecuted
swtich focus when adding DBFS/Workspace to VSCode workspace
udpate readme
  • Loading branch information
Gerhard Brueckl committed Aug 29, 2022
1 parent b34caa6 commit 495f65c
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 32 deletions.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ The extensions can be downloaded from the official Visual Studio Code extension
- rich output and visualization of results
- [File System Integration](#file-system-integration)
- integrate DBFS and Databricks Workspace/notebooks next to your local file system
- easy drag&drop between local, DBFS and also workspace/notebooks
- similar, well-known UI; same behavior as if DBFS and workspace/notebooks were offline
- easy drag&drop between local, DBFS and also workspace/notebooks!
- similar, well-known UI; same behavior as if DBFS and workspace/notebooks existed locally
- [Connection Manager](#connection-manager)
- Easy configuration via standard VS Code settings
- Manage and switch between multiple Databricks workspaces (e.g. DEV/TEST/PROD)
Expand Down Expand Up @@ -54,6 +54,17 @@ The extensions can be downloaded from the official Visual Studio Code extension

# Release Notes

**v1.1.1:**
- make [File System Integration](#file-system-integration) work without having to open the Databricks tab first
- fixed issues with [File System Integration](#file-system-integration)
- folders with a single sub-folder only now work
- fixed an issue where Repos did not work/could not be browsed properly
- switch focus to VSCode Explorer when adding DBFS/Workspace to the VSCode workspace
- added `Pull` Button to the [Repo Manager](#repo-manager) to pull the latest changes from Git
- added proper HTML output for notebooks/executions that returned HTML as plain text
- fixed issue with [Workspace Manager](#workspace-Manager) where files could not be downloaded properly anymore


**v1.1.0:**
- added File System APIs for `dbfs:/` (same as in Databricks) and also `dbws:/` for the workspace/notebooks
- added support for [Files in Repos](https://docs.databricks.com/repos/work-with-notebooks-other-files.html)
Expand Down Expand Up @@ -257,7 +268,7 @@ If you need richer output especially for tables, you can install additional Note
# File System Integration
![File System Integration](/images/FileSystemIntegration.jpg?raw=true "File System Integration")

The File System Integration allows you to mount DBFS and the Databricks workspace/notebooks directly into your VSCode Explorer. You can simply open (or preview) all files and also save them back as if the files were local. So no local copy of your notebooks is necessary anymore but you can work with the files directly. When you open it, it is downloaded, when you save it, it is uploaded again.
The File System Integration allows you to mount DBFS and the Databricks workspace/notebooks directly into your VSCode Explorer. You can simply open (or preview) all files and also save them back as if the files were local. So no local copy of your notebooks is necessary anymore but you can work with the files from the Databricks workspace directly. Everything happens automatically - when you open a file, it is downloaded, when you save it, it is uploaded again.

# SQL Browser
![SQL Browser](/images/SQLBrowser.jpg?raw=true "SQL Browser")
Expand Down
Binary file modified images/FileSystemIntegration.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "databricks-vscode",
"displayName": "Databricks VSCode",
"description": "Extension to manage your Databricks workspace and ease local development",
"version": "1.1.0",
"version": "1.1.1",
"publisher": "paiqo",
"icon": "resources/databricks_extension.png",
"author": {
Expand Down Expand Up @@ -689,11 +689,6 @@
"command": "databricksRepo.delete",
"title": "Delete",
"icon": "$(remove-close)"
},
{
"title": "New Databricks Notebook",
"shortTitle": "Databricks Notebook",
"command": "databricksNotebook.new"
}
],
"menus": {
Expand Down
10 changes: 0 additions & 10 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,6 @@ export async function activate(context: vscode.ExtensionContext) {
vscode.commands.registerCommand('databricksRepo.checkOut', (repo: DatabricksRepoRepository) => repo.checkOut());
vscode.commands.registerCommand('databricksRepo.pull', (repo: DatabricksRepoRepository) => repo.pull());
vscode.commands.registerCommand('databricksRepo.delete', (repo: DatabricksRepoRepository) => repo.delete());


// register DatabricksNotebook Commands
vscode.commands.registerCommand('databricksNotebook.new', async function () {
const newNotebook = await vscode.workspace.openNotebookDocument('jupyter-notebook', new vscode.NotebookData(
[new vscode.NotebookCellData(vscode.NotebookCellKind.Code, '/Hello{1,7} Notebooks/', 'plaintext')]
));

await vscode.commands.executeCommand('vscode.open', newNotebook.uri);
});
}


Expand Down
3 changes: 2 additions & 1 deletion src/helpers/FSHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*--------------------------------------------------------------------------------------------*/

import * as vscode from 'vscode';
import { ThisExtension } from '../ThisExtension';
import { Helper } from './Helper';

export abstract class FSHelper {
Expand All @@ -18,6 +17,8 @@ export abstract class FSHelper {
// add at the end of the workspace
vscode.window.showWarningMessage("This feature is still experimental!");
vscode.workspace.updateWorkspaceFolders(vscode.workspace.workspaceFolders.length, 0, { uri: uri, name: name });

vscode.commands.executeCommand("workbench.files.action.focusFilesExplorer", uri);
}
}

Expand Down
23 changes: 13 additions & 10 deletions src/vscode/treeviews/connections/DatabricksConnectionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export abstract class DatabricksConnectionManager {
return this.Connections.find( (x) => x.displayName == this.LastActiveConnectionName);
}

async activateConnection(con: iDatabricksConnection): Promise<void> {
async activateConnection(con: iDatabricksConnection, refreshComponents: boolean = false): Promise<void> {
ThisExtension.log(`Activating Databricks Connection '${con.displayName}' ...`);

ThisExtension.ActiveConnection = con;
Expand All @@ -54,15 +54,18 @@ export abstract class DatabricksConnectionManager {

ThisExtension.SQLClusterID = undefined;

Helper.delay(100);

vscode.commands.executeCommand("databricksWorkspace.refresh", false);
vscode.commands.executeCommand("databricksClusters.refresh", false);
vscode.commands.executeCommand("databricksJobs.refresh", false);
vscode.commands.executeCommand("databricksFS.refresh", false);
vscode.commands.executeCommand("databricksSecrets.refresh", false);
vscode.commands.executeCommand("databricksSQL.refresh", false);
vscode.commands.executeCommand("databricksRepos.refresh", false);
if(refreshComponents)
{
Helper.delay(100);

vscode.commands.executeCommand("databricksWorkspace.refresh", false);
vscode.commands.executeCommand("databricksClusters.refresh", false);
vscode.commands.executeCommand("databricksJobs.refresh", false);
vscode.commands.executeCommand("databricksFS.refresh", false);
vscode.commands.executeCommand("databricksSecrets.refresh", false);
vscode.commands.executeCommand("databricksSQL.refresh", false);
vscode.commands.executeCommand("databricksRepos.refresh", false);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class DatabricksConnectionManagerCLI extends DatabricksConnectionManager
ThisExtension.updateConfigurationSetting("databricks.lastActiveConnection", this._lastActiveConnectionName);
this._initialized = true;

await this.activateConnection(this.LastActiveConnection);
await this.activateConnection(this.LastActiveConnection, false);

} catch (error) {
let msg = "Could not activate Connection '" + this._lastActiveConnectionName + "'!";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class DatabricksConnectionManagerVSCode extends DatabricksConnectionManag
ThisExtension.updateConfigurationSetting("databricks.lastActiveConnection", this._lastActiveConnectionName, this._settingScope);
this._initialized = true;

await this.activateConnection(this.LastActiveConnection);
await this.activateConnection(this.LastActiveConnection, false);

} catch (error) {
let msg = "Could not activate Connection '" + this._lastActiveConnectionName + "'!";
Expand Down

0 comments on commit 495f65c

Please sign in to comment.