Registry Mirror
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
0902ebb
HTTP proxy support
misha-db Aug 27, 2026
3a86ca0
Apply proxy agent to Databricks/Azure CLI login checks
misha-db Aug 27, 2026
8e6c83a
Cleanup
misha-db Aug 27, 2026
699309c
Fix packaging build and harden system-CA loading
misha-db Aug 27, 2026
2382b3e
Support vscode http proxy settings in databricks cli calls
misha-db Sep 7, 2026
90a3350
Unify DATABRICKS_SDK_PROXY_STRICT_SSL resolution on activation
misha-db Sep 7, 2026
f2e837d
Trust OS-installed corporate CAs in the SDK path on all Node versions
misha-db Sep 7, 2026
39652ff
Merge branch 'main' into http-proxy
misha-db Sep 7, 2026
25219fd
Dedupe CA bundle, tighten types, clarify docs
misha-db Sep 7, 2026
a6630e1
Honor SDK timeout and merged no-proxy config
misha-db Sep 7, 2026
0727387
Update yarn.lock
misha-db Sep 9, 2026
705b4f0
Update proxyAgent.ts
misha-db Sep 9, 2026
80470b3
Merge branch 'main' into http-proxy
misha-db Sep 9, 2026
5787614
Merge branch 'main' into http-proxy
misha-db Sep 9, 2026
24df844
fix(python-setup): actionable error for E_MERGE on a [project]-less p…
rugpanov Sep 9, 2026
1f935b0
Update Databricks CLI to v1.16.0 (#2183)
eng-dev-ecosystem-bot Sep 9, 2026
84aa6f6
feat(python-setup): add the Python-setup preset picker (Full / DB Con…
rugpanov Sep 9, 2026
7da67f1
feat(python-setup): recover from a constraint conflict with a Retry-a…
rugpanov Sep 10, 2026
dbc0ab1
Release: v2.17.0 (#2187)
github-actions[bot] Sep 10, 2026
bf334c7
Update Databricks CLI to v1.16.1 (#2189)
eng-dev-ecosystem-bot Sep 10, 2026
b8d92e3
Release: v2.17.2 (#2191)
github-actions[bot] Sep 11, 2026
5cbc47f
fix(python-setup): report the chosen preset in the setup success pane…
rugpanov Sep 11, 2026
cf2540e
feat(telemetry): emit setupPreset on the python_env.setup.result even…
rugpanov Sep 14, 2026
484a12b
test(ssh): catch bundled CLI truncation and reconnect regressions (#2…
anton-107 Sep 15, 2026
d2158c0
docs: explain local CLI preview in the extension (#2196)
anton-107 Sep 15, 2026
f1ad46a
test(e2e): verify serverless SSH remote window and file transfers (#2…
anton-107 Sep 15, 2026
737f4ec
Downgrade proxy-agent version so Node 18 can run it
misha-db Sep 16, 2026
158948d
Fix test on Windows
misha-db Sep 17, 2026
a5e67de
Merge branch 'main' into http-proxy
misha-db Sep 17, 2026
5aa4d64
refactor(proxy): route SDK proxy helpers through the utils barrel
misha-db Sep 17, 2026
7f86d18
refactor(proxy): stop shipping the unused @vscode/windows-ca-certs re…
misha-db Sep 17, 2026
569e5e6
perf(proxy): read system and configured CA certs concurrently
misha-db Sep 17, 2026
b7950ff
Update index.ts
misha-db Sep 17, 2026
70cad6c
ix proxy handling for HTTP workspaces and HTTPS proxies
misha-db Sep 17, 2026
45d9729
Merge branch 'main' into http-proxy
misha-db Sep 18, 2026
9ebf46f
fix(proxy): apply corp CA to endpoint TLS handshake through a proxy
misha-db Sep 18, 2026
fca7db3
Merge branch 'main' into http-proxy
misha-db Sep 24, 2026
File filter
Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion packages/databricks-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1856,6 +1856,14 @@
"type": "number",
"default": 5,
"description": "The interval in minutes at which the remote state of the bundle is refreshed."
},
"databricks.proxy.strictSSL": {
"type": "boolean",
"markdownDescription": "Controls whether TLS certificates are verified for the extension's Databricks SDK calls. When unset, the built-in `#http.proxyStrictSSL#` value is used. Set to `false` only when a corporate CA certificate cannot be resolved from the system trust store."
},
"databricks.proxy.caCert": {
"type": "string",
"markdownDescription": "Absolute path to a PEM bundle of additional CA certificates to trust for the extension's Databricks SDK calls, merged with the OS trust store and Node's built-in roots. Use when a corporate CA cannot be read from the system store — in particular on Windows, where the extension does not read the system certificate store and relies on this setting for internal CAs."
}
}
}
Expand Down Expand Up @@ -1893,7 +1901,7 @@
"package:copy-webview-toolkit": "cp ./node_modules/@vscode/webview-ui-toolkit/dist/toolkit.js ./out/toolkit.js",
"package:copy-markdown-it": "cp ./node_modules/markdown-it/dist/browser/markdown-it.umd.min.js ./out/markdown-it.min.js",
"package:copy-highlight": "esbuild ./node_modules/highlight.js/lib/common.js --bundle --format=iife --global-name=hljs --outfile=out/highlight.min.js --minify",
"esbuild:base": "esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node --sourcemap --target=es2019",
"esbuild:base": "esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --external:@vscode/windows-ca-certs --format=cjs --platform=node --sourcemap --target=es2019",
"build": "yarn run package:wrappers:write && yarn run package:jupyter-init-script:write && tsc --build --force",
"watch": "yarn run package:wrappers:write && yarn run package:jupyter-init-script:write && yarn run package:copy-webview-toolkit && yarn run package:copy-markdown-it && yarn run package:copy-highlight && tsc --build --watch --verbose",
"fix": "eslint src --fix && prettier . --write",
Expand All @@ -1918,11 +1926,14 @@
"@types/shell-quote": "^1.7.5",
"@vscode/debugadapter": "^1.64.0",
"@vscode/extension-telemetry": "^1.5.2",
"@vscode/proxy-agent": "^0.28.0",
"@vscode/webview-ui-toolkit": "^1.4.0",
"add": "^2.0.6",
"ansi-to-html": "^0.7.2",
"bcryptjs": "^3.0.3",
"highlight.js": "^11.10.0",
"http-proxy-agent": "^7.0.2",
"https-proxy-agent": "^7.0.6",
"lodash": "^4.18.1",
"markdown-it": "^15.0.0",
"minimatch": "^10.2.3",
Expand Down
1 change: 1 addition & 0 deletions packages/databricks-vscode/scripts/package-vsix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@ if [ $ARCH != "win32-arm64" ]; then
fi

yarn run prettier package.json --write

TAG="release-v$(cat package.json | jq -r .version)" yarn run package -t $VSXI_ARCH
18 changes: 3 additions & 15 deletions packages/databricks-vscode/src/configuration/auth/AuthProvider.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
/* eslint-disable @typescript-eslint/naming-convention */
import {
Config,
ProductVersion,
WorkspaceClient,
logging,
} from "@databricks/sdk-experimental";
import {Config, WorkspaceClient, logging} from "@databricks/sdk-experimental";
import {CancellationToken, ProgressLocation, window} from "vscode";
import {normalizeHost} from "../../utils/urlUtils";
import {workspaceConfigs} from "../../vscode-objs/WorkspaceConfigs";

// eslint-disable-next-line @typescript-eslint/no-require-imports
const extensionVersion = require("../../../package.json")
.version as ProductVersion;

import {AzureCliCheck} from "./AzureCliCheck";
import {DatabricksCliCheck} from "./DatabricksCliCheck";
import {Loggers} from "../../logger";
import {CliWrapper} from "../../cli/CliWrapper";
import {ProxyAgent} from "../../utils";

// TODO: Resolve this with SDK's AuthType.
export type AuthType =
Expand Down Expand Up @@ -52,11 +44,7 @@ export abstract class AuthProvider {

async getWorkspaceClient(): Promise<WorkspaceClient> {
const config = await this.getSdkConfig();

return new WorkspaceClient(config, {
product: "databricks-vscode",
productVersion: extensionVersion,
});
return ProxyAgent.createWorkspaceClient(config, this.host);
}

/**
Expand Down
20 changes: 4 additions & 16 deletions packages/databricks-vscode/src/configuration/auth/AzureCliCheck.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import {
Context,
ProductVersion,
WorkspaceClient,
logging,
} from "@databricks/sdk-experimental";
import {Context, logging} from "@databricks/sdk-experimental";
import {CancellationToken, commands, Disposable, Uri, window} from "vscode";
import {Loggers} from "../../logger";
import {AzureCliAuthProvider} from "./AuthProvider";
import {orchestrate, OrchestrationLoopError, Step} from "./orchestrate";
import {ShellUtils} from "../../utils";
import {ProxyAgent, ShellUtils} from "../../utils";
import {cancellableExecFile} from "../../cli/CliWrapper";
import {
FileNotFoundException,
Expand All @@ -18,10 +13,6 @@ import {
// eslint-disable-next-line @typescript-eslint/naming-convention
const {NamedLogger} = logging;

// eslint-disable-next-line @typescript-eslint/no-require-imports
const extensionVersion = require("../../../package.json")
.version as ProductVersion;

type AzureCloud = "AzureCloud" | "AzureChinaCloud" | "AzureUSGovernment";

type AzureStepName =
Expand Down Expand Up @@ -212,16 +203,13 @@ export class AzureCliCheck implements Disposable {
expired: boolean;
error?: Error;
}> {
const workspaceClient = new WorkspaceClient(
const workspaceClient = await ProxyAgent.createWorkspaceClient(
{
host: host.toString(),
authType: "azure-cli",
azureLoginAppId: this.azureLoginAppId,
},
{
product: "databricks-vscode",
productVersion: extensionVersion,
}
host
);
try {
await workspaceClient.currentUser.me(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import {
CancellationToken,
Context,
ProductVersion,
WorkspaceClient,
logging,
} from "@databricks/sdk-experimental";
import {
Expand All @@ -14,10 +12,7 @@ import {DatabricksCliAuthProvider} from "./AuthProvider";
import {orchestrate, OrchestrationLoopError, Step} from "./orchestrate";
import {Loggers} from "../../logger";
import {execFile} from "../../cli/CliWrapper";

// eslint-disable-next-line @typescript-eslint/no-require-imports
const extensionVersion = require("../../../package.json")
.version as ProductVersion;
import {ProxyAgent} from "../../utils";

type StepName = "tryLogin" | "login";

Expand Down Expand Up @@ -111,7 +106,7 @@ export class DatabricksCliCheck implements Disposable {
private async tryLogin(
cancellationToken?: CancellationToken
): Promise<boolean> {
const workspaceClient = new WorkspaceClient(
const workspaceClient = await ProxyAgent.createWorkspaceClient(
{
host: this.authProvider.host.toString(),
authType: "databricks-cli",
Expand All @@ -121,10 +116,7 @@ export class DatabricksCliCheck implements Disposable {
? {workspaceId: this.authProvider.workspaceId}
: {}),
},
{
product: "databricks-vscode",
productVersion: extensionVersion,
}
this.authProvider.host
);

try {
Expand Down
17 changes: 7 additions & 10 deletions packages/databricks-vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {workspaceConfigs} from "./vscode-objs/WorkspaceConfigs";
import {
FileUtils,
PackageJsonUtils,
ProxyAgent,
TerraformUtils,
UrlUtils,
UtilsCommands,
Expand Down Expand Up @@ -675,20 +676,16 @@ export async function activate(
customWhenContext.updateShowClusterView();
}

function updateStrictSSLEnv() {
const httpConfig = workspace.getConfiguration("http");
const proxyStrictSSL = httpConfig.get<boolean>("proxyStrictSSL");
process.env["DATABRICKS_SDK_PROXY_STRICT_SSL"] = proxyStrictSSL
? "true"
: "false";
}

updateFeatureContexts();
updateStrictSSLEnv();
// Resolve TLS strict-SSL through the same layered setting the SDK client
// path uses (databricks.proxy.strictSSL -> http.proxyStrictSSL -> true), so
// both writers of DATABRICKS_SDK_PROXY_STRICT_SSL agree and verification
// stays on by default when nothing is configured.
ProxyAgent.applyProxyStrictSSLEnv();
context.subscriptions.push(
workspace.onDidChangeConfiguration(() => {
updateFeatureContexts();
updateStrictSSLEnv();
ProxyAgent.applyProxyStrictSSLEnv();
})
);

Expand Down
55 changes: 54 additions & 1 deletion packages/databricks-vscode/src/utils/envVarGenerators.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/naming-convention */
import {anything, instance, mock, when} from "ts-mockito";
import {anything, instance, mock, reset, spy, when} from "ts-mockito";
import {ConnectionManager} from "../configuration/ConnectionManager";
import {DatabricksWorkspace} from "../configuration/DatabricksWorkspace";
import {ApiClient, Config} from "@databricks/sdk-experimental";
Expand All @@ -13,6 +13,7 @@ import {
import {Uri} from "vscode";
import assert from "assert";
import {AuthProvider} from "../configuration/auth/AuthProvider";
import {workspaceConfigs} from "../vscode-objs/WorkspaceConfigs";

describe(__filename, () => {
let mockConnectionManager: ConnectionManager;
Expand All @@ -22,8 +23,14 @@ describe(__filename, () => {
const mockHost = "http://example.com";
let mockApiClient: ApiClient;
let existingEnv: any;
let configsSpy: typeof workspaceConfigs;

beforeEach(() => {
configsSpy = spy(workspaceConfigs);
// Default: no proxy configured via VS Code settings, so getProxyEnvVars
// falls back to the process env vars the tests set explicitly.
when(configsSpy.httpProxy).thenReturn(undefined);
when(configsSpy.httpNoProxy).thenReturn([]);
mockConnectionManager = mock(ConnectionManager);
mockDatabricksWorkspace = mock(DatabricksWorkspace);
mockCluster = mock(Cluster);
Expand All @@ -45,6 +52,7 @@ describe(__filename, () => {
});

afterEach(() => {
reset(configsSpy);
process.env = existingEnv;
});

Expand Down Expand Up @@ -86,6 +94,51 @@ describe(__filename, () => {
});
});

it("should use the http.proxy setting for both schemes when set", () => {
delete process.env.HTTP_PROXY;
delete process.env.HTTPS_PROXY;
delete process.env.http_proxy;
delete process.env.https_proxy;
when(configsSpy.httpProxy).thenReturn("http://proxy.local:8080");

const actual = getProxyEnvVars();
assert.deepEqual(actual, {
HTTP_PROXY: "http://proxy.local:8080",
HTTPS_PROXY: "http://proxy.local:8080",
NO_PROXY: undefined,
});
});

it("should let the http.proxy setting win over env vars", () => {
process.env.HTTP_PROXY = "http://env-proxy.local:1";
process.env.HTTPS_PROXY = "http://env-proxy.local:1";
when(configsSpy.httpProxy).thenReturn("http://setting-proxy.local:2");

const actual = getProxyEnvVars();
assert.deepEqual(actual, {
HTTP_PROXY: "http://setting-proxy.local:2",
HTTPS_PROXY: "http://setting-proxy.local:2",
NO_PROXY: undefined,
});
});

it("should merge http.noProxy setting with the NO_PROXY env var", () => {
delete process.env.no_proxy;
process.env.NO_PROXY = "shared.example.com,env.example.com";
when(configsSpy.httpNoProxy).thenReturn([
"setting.example.com",
"shared.example.com",
]);

const actual = getProxyEnvVars();
assert.deepEqual(actual, {
HTTP_PROXY: undefined,
HTTPS_PROXY: undefined,
// Deduped: "shared.example.com" appears in both sources but once here.
NO_PROXY: "setting.example.com,shared.example.com,env.example.com",
});
});

it("should generate env vars with expected cluster id", () => {
const actual = getCommonDatabricksEnvVars(
instance(mockConnectionManager),
Expand Down
37 changes: 34 additions & 3 deletions packages/databricks-vscode/src/utils/envVarGenerators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import {ExtensionContext, Uri} from "vscode";
import {logging, Headers} from "@databricks/sdk-experimental";
import {ConnectionManager} from "../configuration/ConnectionManager";
import {TerraformMetadata} from "./terraformUtils";
import {workspaceConfigs} from "../vscode-objs/WorkspaceConfigs";
import {mergeNoProxy} from "./network/proxyAgent";

// eslint-disable-next-line @typescript-eslint/no-require-imports
const packageJson = require("../../package.json");
Expand Down Expand Up @@ -140,12 +142,41 @@ export async function getDbConnectEnvVars(
/* eslint-enable @typescript-eslint/naming-convention */
}

/**
* Proxy env vars forwarded to the bundled Databricks CLI (and any other
* subprocess). The Go CLI does no proxy handling of its own — it relies on Go's
* `http.ProxyFromEnvironment`, which reads only these env vars — so this is the
* only way to route CLI traffic through a proxy.
*
* Precedence mirrors the in-process SDK path (`proxyAgent.ts`
* `getProxyAgentParams`): the VS Code `http.proxy` setting wins over the OS
* `http(s)_proxy` env vars. That keeps the CLI and the SDK resolving the same
* proxy from the same inputs, so a user who configures the proxy purely through
* the VS Code setting gets it applied to both. `no_proxy` is the exception — the
* `http.noProxy` setting and the env var are *unioned* (not overridden), since a
* bypass list is only ever safer when it's broader.
*
* Absent values stay `undefined` so `removeUndefinedKeys(...)` at the call sites
* strips them, leaving the CLI's own env untouched when nothing is configured.
*/
export function getProxyEnvVars() {
// The `http.proxy` setting is a single URL used for both schemes.
const settingProxy = workspaceConfigs.httpProxy;
const httpProxy =
settingProxy || process.env.HTTP_PROXY || process.env.http_proxy;
const httpsProxy =
settingProxy || process.env.HTTPS_PROXY || process.env.https_proxy;

// Merge the `http.noProxy` setting with the NO_PROXY env var (shared with
// the in-process SDK proxy resolver), then join back to the comma-separated
// form the CLI expects.
const noProxy = mergeNoProxy().join(",") || undefined;

return {
/* eslint-disable @typescript-eslint/naming-convention */
HTTP_PROXY: process.env.HTTP_PROXY || process.env.http_proxy,
HTTPS_PROXY: process.env.HTTPS_PROXY || process.env.https_proxy,
NO_PROXY: process.env.NO_PROXY || process.env.no_proxy,
HTTP_PROXY: httpProxy,
HTTPS_PROXY: httpsProxy,
NO_PROXY: noProxy,
/* eslint-enable @typescript-eslint/naming-convention */
};
}
Expand Down
1 change: 1 addition & 0 deletions packages/databricks-vscode/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ export * as EnvVarGenerators from "./envVarGenerators";
export * as DateUtils from "./DateUtils";
export * as TerraformUtils from "./terraformUtils";
export * as HostUtils from "./hostUtils";
export {ProxyAgent} from "./network";
1 change: 1 addition & 0 deletions packages/databricks-vscode/src/utils/network/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * as ProxyAgent from "./proxyAgent";
Loading
Loading