From 14577b28e6a3425b661bd19ed548f7a061c2b33a Mon Sep 17 00:00:00 2001 From: QuangNguyen2609 Date: Tue, 3 Mar 2026 22:54:52 +1030 Subject: [PATCH 1/2] feat: increase Python cell execution timeout to 3 minutes and update related configurations --- package.json | 4 ++-- src/constants/index.ts | 2 +- src/kernels/pythonKernelController.ts | 3 ++- src/kernels/utils.ts | 10 ++++++++++ 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 3c35772..9594704 100644 --- a/package.json +++ b/package.json @@ -139,8 +139,8 @@ }, "databricks-notebook.pythonExecutionTimeout": { "type": "number", - "default": 100000, - "description": "Timeout for Python cell execution in milliseconds" + "default": 180000, + "description": "Timeout for Python cell execution in milliseconds (default: 180000ms / 3 minutes)" }, "databricks-notebook.kernelStartupTimeout": { "type": "number", diff --git a/src/constants/index.ts b/src/constants/index.ts index f519d57..78620e3 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -22,7 +22,7 @@ export const ENVIRONMENT_REFRESH_DELAY_MS = 500; export const KERNEL_STARTUP_TIMEOUT_MS = 30000; /** Default execution timeout (ms) */ -export const EXECUTION_TIMEOUT_MS = 60000; +export const EXECUTION_TIMEOUT_MS = 180000; /** Default timeout for short operations like ping/reset (ms) */ export const SHORT_OPERATION_TIMEOUT_MS = 5000; diff --git a/src/kernels/pythonKernelController.ts b/src/kernels/pythonKernelController.ts index 3ea791e..3ed7f01 100644 --- a/src/kernels/pythonKernelController.ts +++ b/src/kernels/pythonKernelController.ts @@ -17,6 +17,7 @@ import { } from '../utils/codeTransform'; import { extractErrorMessage } from '../utils/errorHandler'; import { showErrorNotification, showInfoMessage } from '../utils/notifications'; +import { getExecutionTimeout } from './utils'; /** * NotebookController for a specific Python interpreter @@ -236,7 +237,7 @@ export class PythonKernelController implements vscode.Disposable { // Execute the code this._isExecuting = true; - const result = await this._executor.execute(executableCode); + const result = await this._executor.execute(executableCode, getExecutionTimeout()); this._isExecuting = false; // Check if interrupted (KeyboardInterrupt) diff --git a/src/kernels/utils.ts b/src/kernels/utils.ts index 9a5ca6c..84dab6a 100644 --- a/src/kernels/utils.ts +++ b/src/kernels/utils.ts @@ -302,6 +302,16 @@ export function getKernelStartupTimeout(defaultTimeout: number): number { .get('kernelStartupTimeout', defaultTimeout); } +/** + * Get cell execution timeout from configuration + * @returns Timeout in milliseconds + */ +export function getExecutionTimeout(): number { + return vscode.workspace + .getConfiguration('databricks-notebook') + .get('pythonExecutionTimeout')!; +} + /** * Get the configured data display limit for DataFrames * @param defaultLimit - Default limit to use if not configured From fed129508c596a2dbd75efd183b376115b05cdb7 Mon Sep 17 00:00:00 2001 From: QuangNguyen2609 Date: Tue, 3 Mar 2026 22:59:48 +1030 Subject: [PATCH 2/2] chore: update changelog for version 0.4.4 --- CHANGELOG.md | 6 ++++++ package-lock.json | 4 ++-- package.json | 2 +- src/test/kernelControls.test.ts | 3 +++ src/test/pythonKernelController.test.ts | 3 +++ 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d123567..8e6065b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to the Databricks Notebook Studio extension will be document The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.4.4] - 2026-03-03 + +### Fixed +- **Cell execution timeout now respects VS Code configuration**: The `databricks-notebook.pythonExecutionTimeout` setting was defined but never applied — all cells silently used a hardcoded 60-second limit regardless of the configured value +- Default execution timeout raised from 60 seconds to **180 seconds (3 minutes)** to better accommodate long-running Databricks serverless SQL queries + ## [0.4.3] - 2026-01-22 ### Added diff --git a/package-lock.json b/package-lock.json index 5dd9fa5..8977798 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "databricks-notebook-studio", - "version": "0.4.3", + "version": "0.4.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "databricks-notebook-studio", - "version": "0.4.3", + "version": "0.4.4", "license": "MIT", "devDependencies": { "@istanbuljs/nyc-config-typescript": "^1.0.2", diff --git a/package.json b/package.json index 9594704..39fd322 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "databricks-notebook-studio", "displayName": "Databricks Notebook Studio", "description": "Visualize Databricks .py notebooks with rich DataFrame display, interactive tables, column sorting/resizing, and multi-profile authentication", - "version": "0.4.3", + "version": "0.4.4", "license": "MIT", "type": "commonjs", "publisher": "databricks-notebook-studio", diff --git a/src/test/kernelControls.test.ts b/src/test/kernelControls.test.ts index c00ce34..4ad1aa1 100644 --- a/src/test/kernelControls.test.ts +++ b/src/test/kernelControls.test.ts @@ -207,6 +207,9 @@ const mockVscode = { }, workspace: { getWorkspaceFolder: () => ({ uri: { fsPath: '/workspace' } }), + getConfiguration: () => ({ + get: (_key: string, defaultValue?: unknown) => defaultValue, + }), }, Disposable: class { static from(...disposables: { dispose: () => void }[]) { diff --git a/src/test/pythonKernelController.test.ts b/src/test/pythonKernelController.test.ts index 1f5139b..cc11bfd 100644 --- a/src/test/pythonKernelController.test.ts +++ b/src/test/pythonKernelController.test.ts @@ -150,6 +150,9 @@ const mockVscode = { }, workspace: { getWorkspaceFolder: () => ({ uri: { fsPath: '/workspace' } }), + getConfiguration: () => ({ + get: (_key: string, defaultValue?: unknown) => defaultValue, + }), }, Disposable: class { static from(...disposables: { dispose: () => void }[]) {