Skip to content

Commit 772d112

Browse files
committed
Improve login flow, properly init cluster manager
ConnectionManager first tries to login, and only after that starts listening to configModel changes. During login flow it updates configModel with authProvider, triggering reloading of the config state. That's when we load clusterId from the bundle-validate model. But the clusterId changes never trigger updateClusterManager, since they happen before ConnectionManager is done with the login and before it started listening to the changes. Moving the manual update* calls after we set the auth provider (and awating till the config model loads all the sub-configs data) fixes the problem.
1 parent a55eb15 commit 772d112

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/databricks-vscode/src/configuration/ConnectionManager.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,14 +246,13 @@ export class ConnectionManager implements Disposable {
246246
await this._databricksWorkspace.optionalEnableFilesInReposPopup(
247247
this._workspaceClient
248248
);
249-
250-
await this.updateSyncDestinationMapper();
251-
await this.updateClusterManager();
252249
await this.configModel.set(
253250
"authProfile",
254251
authProvider.toJSON().profile as string | undefined
255252
);
256253
await this.configModel.setAuthProvider(authProvider);
254+
await this.updateSyncDestinationMapper();
255+
await this.updateClusterManager();
257256
await this._metadataService.setApiClient(this.apiClient);
258257
this.updateState("CONNECTED");
259258
});

0 commit comments

Comments
 (0)