Skip to content

Commit e2adc6d

Browse files
authored
Bring missing changes from the main branch (#1093)
There was only this change left: 41ca392
1 parent 83da2b5 commit e2adc6d

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,11 @@ export class CliWrapper {
195195
return [];
196196
}
197197

198-
const profiles = JSON.parse(res.stdout).profiles || [];
198+
let profiles = JSON.parse(res.stdout).profiles || [];
199+
200+
// filter out account profiles
201+
profiles = profiles.filter((p: any) => !p.account_id);
202+
199203
const result = [];
200204

201205
for (const profile of profiles) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,11 +469,11 @@ async function validateDatabricksHost(
469469

470470
function authMethodsForHostname(host: URL): Array<AuthType> {
471471
if (UrlUtils.isAzureHost(host)) {
472-
return ["azure-cli", "pat"];
472+
return ["databricks-cli", "azure-cli", "pat"];
473473
}
474474

475475
if (UrlUtils.isGcpHost(host)) {
476-
return ["pat"];
476+
return ["databricks-cli", "google-id", "pat"];
477477
}
478478

479479
if (UrlUtils.isAwsHost(host)) {

packages/databricks-vscode/src/configuration/auth/AuthProvider.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ import {DatabricksCliCheck} from "./DatabricksCliCheck";
1818
import {Loggers} from "../../logger";
1919

2020
// TODO: Resolve this with SDK's AuthType.
21-
export type AuthType = "azure-cli" | "databricks-cli" | "profile" | "pat";
21+
export type AuthType =
22+
| "azure-cli"
23+
| "databricks-cli"
24+
| "google-id"
25+
| "profile"
26+
| "pat";
2227

2328
export abstract class AuthProvider {
2429
constructor(

0 commit comments

Comments
 (0)