mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
* Fix #4356 New Notebook from connection doesn't connect Fix new notebook error by passing profile instead of ID. - I could've just sent the ID over, but this fix sets the stage for disconnected connections to work (since we have enough info to properly connect). - There's a bug in NotebookModel blocking the disconnected connection part working, but Yurong's in progress fixes will unblock this. Hence checking in as-is and working to properly unblock once that's in. * Support connection profile in commandline service - Added new context API for things that want to work on commandline and object explorer - Refactored commandlineservice slightly to be async & have a simpler execution flow (far fewer if/else statements) * Fix unit tests - Fixed 2 issues raised by tests (sholdn't do new query if no profile passed, shouldn't error on new query failing) - Updated unit tests to pass as expected given changes to the APIs.
This commit is contained in:
@@ -408,6 +408,10 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
||||
}
|
||||
let profile = new ConnectionProfile(this._notebookOptions.capabilitiesService, this.connectionProfile);
|
||||
|
||||
// TODO: this code needs to be fixed since it is called before the this._savedKernelInfo is set.
|
||||
// This means it always fails, and we end up using the default connection instead. If you right-click
|
||||
// and run "New Notebook" on a disconnected server this means you get the wrong connection (global active)
|
||||
// instead of the one you chose, or it'll fail to connect in general
|
||||
if (this.isValidConnection(profile)) {
|
||||
this._activeConnection = profile;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user