Repository navigation
Run Volume PUT, GET and REMOVE through the kernel backend - #613
aakash-saravanan-db wants to merge 5 commits into
Conversation
|
Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase ( |
ad49367 to
7b276d7
Compare
7b276d7 to
12876fc
Compare
There was a problem hiding this comment.
Verdict: 1 Medium · 1 Low
Mostly sound, with one medium issue: on the kernel path, the new StagingError wrapping can also catch the statement's own execution errors, not just transfer errors. Nits: there is a stray blank line in the CHANGELOG entry, and the constructor comment in KernelOperationBackend still says cancel() "always routes to the cancellable execution". Follow-up (not caused by this PR): executeStatement waits for the transfer before it returns the operation, so a caller can only interrupt an in-flight transfer by closing the session.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 3 Low
Mostly sound, with 1 medium and 2 low concerns. The dispatch, completion and error mapping hold together, but the code assumes native APIs that the pinned 1.4.0 bindings don't ship yet.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Low
Mostly sound, with 1 medium and 1 low concern. The facade dispatch, the result gating after completion and the staging error mapping look right. Kernel Volume support still depends on a published native package and platform pins, which the PR description already tracks.
This overview is Claude Opus 5.5's initial take; some of its points were set aside by the cross-check judge — see the findings below.
🔀 2 findings considered and dismissed by the judge
- 🟡 Medium
lib/DBSQLSession.ts:118— When native completion rejects, executeStatement never returns the already-registered operation, leaving its resources and session collection entry inaccessible
Judge's evidence:await this.operations.closeAll(); - 🟡 Medium
tests/e2e/kernel/staging-close-e2e.test.ts:54— If polling or session close stalls, Mocha's timeout fails the test without settling these awaits, so the finally block cannot finish and the listening HTTP serv
Judge's evidence:this.timeout(10000);
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 2 Low
The design looks sound — 1 medium and 1 low concern, both about native binding compatibility. The completion path, error mapping and the reused staging e2e suite look correct. Like Thrift, a failed transfer leaves the operation registered and unclosed; that was already the case before this PR and could be follow-up work.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Medium · 1 Low
Mostly sound, with 1 medium and 1 low concern. The kernel completion path matches the Thrift staging contract. The medium concern is that the code assumes a native binding the published package pins don't ship yet.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Low
Mostly sound, with one medium concern: kernel staging dispatch calls the new native method without checking the loaded binding supports it. Error mapping, cancel/close handling and test coverage look correct. The pins and a published native release are still open, as the PR description says.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 2 Low
The design is sound, with one medium concern: the native binding is called without a capability check. As currently pinned, a kernel executeStatement with stagingAllowedLocalPath set fails with a TypeError. Before this change the option was ignored with a warning.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 2 Low
Mostly sound, with 2 medium concerns. Kernel staging dispatch, the cancel/close mapping and the tests look right. Local-file error decoding drops SQLSTATE, and no binding capability check guards the new native method. Platform package pins are still pending, as the PR description says.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Medium · 3 Low
Mostly solid, with 1 medium and 2 low concerns. The new staging path calls the native Volume API without checking that the installed binding has it, and the native platform package pins haven't been bumped yet. As in the Thrift path, an operation whose staging transfer fails isn't closed; that is an existing gap and can be follow-up work.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
Other findings
- 🟡 Medium — If execution never reaches polling or session.close hangs, Mocha's timeout does not interrupt these awaits, so the finally block cannot shut down the listening server and CI can remain alive indefinitely. Bound the polling, execution, and cleanup waits with explicit timeouts and ensure server shutdown still runs when session cleanup fails. (Found by GPT-6.1 Sol · the judge couldn't confirm it)
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Medium · 1 Low
Needs changes: 1 high, 2 low. Volume completion on the kernel backend fails with the currently pinned native packages. An older binding without completeVolumeOperation now breaks every kernel statement that sets stagingAllowedLocalPath, where it used to log a warning and continue.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Low
Needs changes: 1 high, 1 medium. The JS dispatch, error mapping and tests look sound. The main risk is that the native API is called with no capability guard while the published bindings still lack it.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 2 Low
Needs changes: 1 high, 1 medium. The wiring and error mapping look sound and have tests. But the PR calls a native API that the pinned 1.5.0 bindings don't ship, and nothing checks whether that API is available first.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 2 Low
Mostly sound, with 1 medium and 1 low concern. Delegating to the kernel and mapping its errors looks right, and the unit tests cover the new branches. The native packages are still pinned at 1.5.0, so the new call needs a capability guard, or the pins must land in this PR.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
| if (opBackend.completeStagingOperation) { | ||
| await this.runBackend(() => opBackend.completeStagingOperation!(allowedLocalPath)); | ||
| return operation; | ||
| } |
There was a problem hiding this comment.
🔵 Low — If completeStagingOperation rejects, executeStatement throws after wrapOperation has registered the operation and never closes it. The native statement stays held until session close, which is the same as the existing Thrift staging failure path. Close the operation best-effort on failure and rethrow the original error.
(Anchored to the nearest changed line — see the description for the exact location.)
🔀 Found by GPT-6.1 Sol · confirmed by the judge
There was a problem hiding this comment.
Answered in #613 (comment): kept to match Thrift, whose handleStagingOperation also throws after wrapOperation without closing the operation. Session close cleans it up.
There was a problem hiding this comment.
Still open at 9acad8c: lib/DBSQLSession.ts:113 throws without closing the operation. Thrift has the same gap, but matching it means both paths keep the leak until session close.
| ## Unreleased | ||
|
|
||
| - Release completed Thrift CloudFetch body-reader listeners so idle connections do not retain downloaded result buffers. | ||
| - Support Volume file transfers on the kernel backend when `stagingAllowedLocalPath` is supplied. Symlink targets must remain within configured allowed roots; in-root symlinks are permitted. (#613) |
There was a problem hiding this comment.
🔵 Low — The changelog entry says kernel Volume transfers are supported. It doesn't say they need a published native package newer than 1.5.0 or mention the kernel change they depend on. Add the required version and reference, or bump the pins in this PR.
🔀 Found by Claude Opus 5.5 · confirmed by the judge
There was a problem hiding this comment.
The pin bump lands in this PR before merge (release gate in #613 (comment)), so the entry is true when this ships.
There was a problem hiding this comment.
Still open at 9acad8c: all platform pins remain 1.5.0 (package.json:95-102), and CHANGELOG.md:6 has no required version or kernel reference.
There was a problem hiding this comment.
Leaving this open: the required native package version goes into the changelog with the pin bump, once the bindings release that includes databricks/databricks-sql-kernel#520 and #521 exists.
| const handle = await this.getFetchHandle(); | ||
| let outcome; | ||
| try { | ||
| outcome = await handle.completeVolumeOperation(allowedPaths, true); // Thrift REMOVE treats missing objects as success. |
There was a problem hiding this comment.
🟠 High — The pinned 1.5.0 native binding has no completeVolumeOperation, and assertBindingShape in KernelNativeLoader.ts doesn't check for it. With that binding, any kernel executeStatement that passes stagingAllowedLocalPath, including a plain SELECT, throws a TypeError. Check typeof handle.completeVolumeOperation === 'function' first, or add it to the shape check, and throw a clear error.
🔀 Found by both reviewers · confirmed by the judge
There was a problem hiding this comment.
Duplicate of the release gate in #613 (comment). The eight platform packages are pinned to one exact version. Those pins and the lockfile move to the first kernel release that includes databricks-sql-kernel#512 and databricks-sql-kernel#513 before merge, so the published driver always installs a binding that has completeVolumeOperation. See the Kernel version section of the description.
There was a problem hiding this comment.
Still open at 9acad8c: package.json:95-102 still pins 1.5.0. Nothing guards completeVolumeOperation, and assertBindingShape doesn't check it. Keep this open until the pin bump lands.
There was a problem hiding this comment.
Blocked on the kernel release, so I'm leaving this open: completeVolumeOperation and isVolumeOperation need databricks/databricks-sql-kernel#520 and #521 merged and published native packages that include them, and the package.json platform pins move to that release before this merges. KERNEL_REV already pins the #521 head for source builds.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Low
Mostly sound, with one medium concern: nothing checks that the native binding supports Volume transfers while the platform pins stay at 1.5.0. The PR description acknowledges the pins. Follow-up outside this PR's scope: on both backends, an operation whose staging fails is never closed and stays tracked until the session closes.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
| ? options.stagingAllowedLocalPath | ||
| : [options.stagingAllowedLocalPath]; | ||
| if (opBackend.completeStagingOperation) { | ||
| await this.runBackend(() => opBackend.completeStagingOperation!(allowedLocalPath)); |
There was a problem hiding this comment.
🔵 Low — If native completion rejects, executeStatement throws after wrapOperation has already added the operation to the session's collection. The caller never gets the handle, so the operation and native results stay open until session close. The Thrift staging path behaves the same way, so the impact is small. Fix: on failure, best-effort close the operation and remove it from the collection, without masking the original error.
🔀 Found by GPT-6.1 Sol · confirmed by the judge
There was a problem hiding this comment.
Answered in #613 (comment): kept to match Thrift, whose handleStagingOperation also throws after wrapOperation without closing the operation. Session close cleans it up.
There was a problem hiding this comment.
Still open at 9acad8c: lib/DBSQLSession.ts:113 still leaves the operation in the collection if completeStagingOperation rejects. Matching Thrift doesn't fix the leak.
| const handle = await this.getFetchHandle(); | ||
| let outcome; | ||
| try { | ||
| outcome = await handle.completeVolumeOperation(allowedPaths, true); // Thrift REMOVE treats missing objects as success. |
There was a problem hiding this comment.
🟠 High — The call is made with no check that the binding exposes it, and package.json still pins every kernel platform package at 1.5.0. A binding without the method throws a TypeError for any kernel executeStatement that sets stagingAllowedLocalPath, including plain SELECTs that used to warn and run. Fix: add a typeof guard that falls back to the old behaviour or throws a clear StagingError, and bump the platform pins in the same PR.
🔀 Found by both reviewers · confirmed by the judge
There was a problem hiding this comment.
Duplicate of the release gate in #613 (comment). The eight platform packages are pinned to one exact version. Those pins and the lockfile move to the first kernel release that includes databricks-sql-kernel#512 and databricks-sql-kernel#513 before merge, so the published driver always installs a binding that has completeVolumeOperation. See the Kernel version section of the description.
There was a problem hiding this comment.
Still open at 9acad8c: package.json:95-102 still pins 1.5.0, and there's no typeof guard at KernelOperationBackend.ts:323.
There was a problem hiding this comment.
Blocked on the kernel release, so I'm leaving this open: completeVolumeOperation and isVolumeOperation need databricks/databricks-sql-kernel#520 and #521 merged and published native packages that include them, and the package.json platform pins move to that release before this merges. KERNEL_REV already pins the #521 head for source builds.
There was a problem hiding this comment.
Still open at 3d3e986: package.json:95-102 still pins 1.5.0, and KernelOperationBackend.ts:323 has no typeof guard. This stays blocked on the kernel release.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Low
Mostly solid, with one medium concern: there is no check that the installed native binding supports Volume transfers. Platform pins and locks are still pending, as the PR description says. A failed staging completion does not close the operation on either backend; that predates this PR and could be follow-up work.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
| ? options.stagingAllowedLocalPath | ||
| : [options.stagingAllowedLocalPath]; | ||
| if (opBackend.completeStagingOperation) { | ||
| await this.runBackend(() => opBackend.completeStagingOperation!(allowedLocalPath)); |
There was a problem hiding this comment.
🔵 Low — If native completion rejects, executeStatement throws after wrapOperation has registered the operation, so the caller never gets a handle and the backend handle stays open until session close. Close the wrapped operation best-effort before rethrowing. The Thrift staging path already behaves the same way, so the impact is small.
🔀 Found by GPT-6.1 Sol · confirmed by the judge
There was a problem hiding this comment.
Answered in #613 (comment): kept to match Thrift, whose handleStagingOperation also throws after wrapOperation without closing the operation. Session close cleans it up.
There was a problem hiding this comment.
Still open at 9acad8c: lib/DBSQLSession.ts:113 still leaves the operation open until session close if completion rejects. Thrift has the same gap.
| const handle = await this.getFetchHandle(); | ||
| let outcome; | ||
| try { | ||
| outcome = await handle.completeVolumeOperation(allowedPaths, true); // Thrift REMOVE treats missing objects as success. |
There was a problem hiding this comment.
🟠 High — The loader's assertBindingShape does not check the new Volume API. An older installed binding that lacks completeVolumeOperation fails any statement run with stagingAllowedLocalPath, including a plain SELECT, with an opaque TypeError, and isStagingOperation becomes undefined. Check typeof handle.completeVolumeOperation === 'function' first, then throw a clear error or fall back, and add a test.
🔀 Found by both reviewers · confirmed by the judge
There was a problem hiding this comment.
Duplicate of the release gate in #613 (comment). The eight platform packages are pinned to one exact version. Those pins and the lockfile move to the first kernel release that includes databricks-sql-kernel#512 and databricks-sql-kernel#513 before merge, so the published driver always installs a binding that has completeVolumeOperation. See the Kernel version section of the description.
There was a problem hiding this comment.
Still open at 9acad8c: all eight platform pins are still 1.5.0, and nothing guards completeVolumeOperation (KernelOperationBackend.ts:323). Keep open until the pin bump lands.
There was a problem hiding this comment.
Blocked on the kernel release, so I'm leaving this open: completeVolumeOperation and isVolumeOperation need databricks/databricks-sql-kernel#520 and #521 merged and published native packages that include them, and the package.json platform pins move to that release before this merges. KERNEL_REV already pins the #521 head for source builds.
There was a problem hiding this comment.
Still open at 3d3e986: all eight platform pins remain 1.5.0 (package.json:95-102), and KernelOperationBackend.ts:323 still calls completeVolumeOperation unguarded.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Medium · 1 Low
Needs work: 2 medium concerns and 1 low. The staging dispatch, error mapping and close/cancel handling look correct, but the new native calls and the zero-timeout forward assume a kernel binding newer than the pinned 1.5.0 packages.
| // time out immediately, so we omit it and let the kernel keep its (large) | ||
| // default — preserving the "effectively no idle timeout" semantics. | ||
| if (typeof socketTimeout === 'number' && socketTimeout > 0) { | ||
| if (typeof socketTimeout === 'number' && socketTimeout >= 0) { |
There was a problem hiding this comment.
🟡 Medium — socketTimeout: 0 is now forwarded as socketTimeoutMs: 0, but the platform packages are still pinned at 1.5.0. Per the removed comment, 0 meant an immediate reqwest timeout on those binaries. Keep the > 0 guard until the pins move to a binding that handles zero, or gate the forward on a capability check.
🔀 Found by Claude Opus 5.5 · confirmed by the judge
There was a problem hiding this comment.
Leaving this open with the pin bump: at the bindings this PR targets (#521), socketTimeoutMs: 0 keeps the SQL request default and sets no idle limit, which is what forwarding socketTimeout: 0 relies on. It is safe once the package.json pins move to the release that includes databricks/databricks-sql-kernel#520 and #521.
There was a problem hiding this comment.
Still open at 3d3e986: KernelAuth.ts:535 forwards 0, but package.json:95-102 still pins the kernel binaries at 1.5.0.
| const handle = await this.getFetchHandle(); | ||
| let outcome; | ||
| try { | ||
| outcome = await handle.completeVolumeOperation(allowedPaths, true); // Thrift REMOVE treats missing objects as success. |
There was a problem hiding this comment.
🟠 High — The code calls the new native completeVolumeOperation with no capability check, and every kernel platform pin in package.json is still 1.5.0. On an installed older binding, stagingAllowedLocalPath fails with an opaque TypeError, even for a plain SELECT. Bump the pins together with the release and check typeof handle.completeVolumeOperation === 'function', throwing a clear error.
🔀 Found by both reviewers · confirmed by the judge
There was a problem hiding this comment.
Blocked on the kernel release, so I'm leaving this open: completeVolumeOperation and isVolumeOperation need databricks/databricks-sql-kernel#520 and #521 merged and published native packages that include them, and the package.json platform pins move to that release before this merges. KERNEL_REV already pins the #521 head for source builds.
There was a problem hiding this comment.
Still open at 3d3e986: platform pins remain 1.5.0, and there's still no typeof handle.completeVolumeOperation capability check (KernelOperationBackend.ts:323).
| ## Unreleased | ||
|
|
||
| - Release completed Thrift CloudFetch body-reader listeners so idle connections do not retain downloaded result buffers. | ||
| - Support Volume file transfers on the kernel backend when `stagingAllowedLocalPath` is supplied. Symlink targets must remain within configured allowed roots; in-root symlinks are permitted. (#613) |
There was a problem hiding this comment.
🔵 Low — The changelog entry does not say the feature needs a newer published native package or reference the kernel change, and the pins are unchanged. Add the required package version or a follow-up note, plus the kernel reference.
🔀 Found by Claude Opus 5.5 · confirmed by the judge
There was a problem hiding this comment.
Leaving this open: the required native package version goes into the changelog with the pin bump, once the bindings release that includes databricks/databricks-sql-kernel#520 and #521 exists.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Medium · 2 Low
Needs changes: 2 medium and 1 low concern. The staging flow and error mapping look sound, but the new native calls and socketTimeout: 0 forwarding break users on the currently pinned 1.5.0 kernel binaries.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
| const handle = await this.getFetchHandle(); | ||
| let outcome; | ||
| try { | ||
| outcome = await handle.completeVolumeOperation(allowedPaths, true); // Thrift REMOVE treats missing objects as success. |
There was a problem hiding this comment.
🟠 High — The platform packages are still pinned to 1.5.0 in package.json, which has no completeVolumeOperation. An npm-installed driver would throw an opaque TypeError for kernel executeStatement with stagingAllowedLocalPath, which used to be ignored. Add a capability check that throws a clear error, or bump the pins with the native release.
🔀 Found by both reviewers · confirmed by the judge
There was a problem hiding this comment.
Blocked on the kernel release, so I'm leaving this open: completeVolumeOperation and isVolumeOperation need databricks/databricks-sql-kernel#520 and #521 merged and published native packages that include them, and the package.json platform pins move to that release before this merges. KERNEL_REV already pins the #521 head for source builds.
There was a problem hiding this comment.
Still open at 3d3e986: platform pins are still 1.5.0 and there's no capability check. This must stay unresolved until the native release ships.
| // time out immediately, so we omit it and let the kernel keep its (large) | ||
| // default — preserving the "effectively no idle timeout" semantics. | ||
| if (typeof socketTimeout === 'number' && socketTimeout > 0) { | ||
| if (typeof socketTimeout === 'number' && socketTimeout >= 0) { |
There was a problem hiding this comment.
🟡 Medium — socketTimeout: 0 is now forwarded to the native binding. The old comment said a zero reqwest timeout fails requests immediately, and the pinned 1.5.0 binary has no zero-handling. Gate forwarding of 0 on a binding that supports it, or ship this with the pin bump.
🔀 Found by Claude Opus 5.5 · confirmed by the judge
There was a problem hiding this comment.
Leaving this open with the pin bump: at the bindings this PR targets (#521), socketTimeoutMs: 0 keeps the SQL request default and sets no idle limit, which is what forwarding socketTimeout: 0 relies on. It is safe once the package.json pins move to the release that includes databricks/databricks-sql-kernel#520 and #521.
There was a problem hiding this comment.
Still open at 3d3e986: package.json:95-102 still pins kernel 1.5.0, and KernelAuth.ts:535 forwards 0 without a version gate.
| - Release completed Thrift CloudFetch body-reader listeners so idle connections do not retain downloaded result buffers. | ||
| - **Behavior change:** Thrift `getSchema()` and `getResultMetadata().schema` return `{ columns: [] }` for statements without output columns when Arrow metadata has no fields. Check `columns.length` before indexing. `getMetadata()` and responses without Arrow metadata (including `arrowEnabled: false` and older protocols) retain the `Result STRING` placeholder. (#651) | ||
| - Fix `fetchAll()` and `fetchChunk()` hanging on column-based results with an empty or missing schema. (#651) | ||
| - Support Volume file transfers on the kernel backend when `stagingAllowedLocalPath` is supplied. Symlink targets must remain within configured allowed roots; in-root symlinks are permitted. (#613) |
There was a problem hiding this comment.
🔵 Low — The changelog entries rely on native APIs that no published package pinned here provides, and they don't name the required native version. State the required package version and reference the kernel change.
🔀 Found by Claude Opus 5.5 · confirmed by the judge
There was a problem hiding this comment.
Leaving this open: the required native package version goes into the changelog with the pin bump, once the bindings release that includes databricks/databricks-sql-kernel#520 and #521 exists.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 2 Medium
Mostly sound, with 1 medium concern. Staging dispatch, cancel/close mapping and error cleanup look correct. Merge is still blocked on the platform package pins and lockfile updates the PR description lists. Nit: the socketTimeout row in CONNECTION_PARAMETERS.md no longer fits the table's Prettier column width.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
Other findings
- 🟡 Medium — If execution fails before polling or session closure hangs, Mocha's timeout leaves this async function suspended with its HTTP server open, potentially hanging the CI process instead of completing the regression test. Bound polling, execution, and cleanup with rejecting deadlines, and ensure server shutdown runs even when session closure stalls. (Found by GPT-6.1 Sol · the judge couldn't confirm it)
| const handle = await this.getFetchHandle(); | ||
| let outcome; | ||
| try { | ||
| outcome = await handle.completeVolumeOperation(allowedPaths, true); // Thrift REMOVE treats missing objects as success. |
There was a problem hiding this comment.
🟠 High — The new code calls completeVolumeOperation and isVolumeOperation on the native binding. The platform packages in package.json are still pinned to 1.5.0, which lacks them. Installed consumers who pass stagingAllowedLocalPath on kernel would hit a TypeError. Bump all platform pins and lockfiles to the matching kernel release before shipping.
🔀 Found by GPT-6.1 Sol · confirmed by the judge
There was a problem hiding this comment.
Blocked on the kernel release, so I'm leaving this open: completeVolumeOperation and isVolumeOperation need databricks/databricks-sql-kernel#520 and #521 merged and published native packages that include them, and the package.json platform pins move to that release before this merges. KERNEL_REV already pins the #521 head for source builds.
There was a problem hiding this comment.
Still open at 3d3e986: the platform pins are still at 1.5.0. They need to move to a published kernel release with both volume methods before merge.
| // time out immediately, so we omit it and let the kernel keep its (large) | ||
| // default — preserving the "effectively no idle timeout" semantics. | ||
| if (typeof socketTimeout === 'number' && socketTimeout > 0) { | ||
| if (typeof socketTimeout === 'number' && socketTimeout >= 0) { |
There was a problem hiding this comment.
🟡 Medium — The change now forwards socketTimeout: 0 for every kernel connection. The removed comment said an older binding would treat 0 as an immediate reqwest timeout, and the platform pins are still 1.5.0. Installed users who set socketTimeout: 0 could then see every query fail. Ship this change together with the pin bump, or gate it on binding support.
🔀 Found by Claude Opus 5.5 · confirmed by the judge
There was a problem hiding this comment.
Leaving this open with the pin bump: at the bindings this PR targets (#521), socketTimeoutMs: 0 keeps the SQL request default and sets no idle limit, which is what forwarding socketTimeout: 0 relies on. It is safe once the package.json pins move to the release that includes databricks/databricks-sql-kernel#520 and #521.
There was a problem hiding this comment.
Still open at 3d3e986: the platform pins are still 1.5.0 (package.json:95-102), but socketTimeout: 0 is forwarded without a gate (KernelAuth.ts:535).
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Medium · 2 Low
Two medium and one low concern: the new native-dependent paths don't work with the currently pinned 1.5.0 kernel binding. The staging dispatch and the error cleanup look correct otherwise.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Medium
Needs changes: 2 medium concerns. Both come from relying on native behaviour that the currently pinned platform packages may not ship. The PR description already says the pins and lockfiles must be updated before merge.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 High · 1 Medium
Needs changes before merge: 2 medium concerns. Both come from relying on native behavior that isn't published yet. The new completion path and the change to forward 0 both break against the currently pinned binding.
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 2 High · 2 Low
Needs changes: 1 high, 1 low. The staging dispatch, cleanup and error mapping look correct, but forwarding socketTimeout: 0 depends on a native binding that isn't published or pinned yet.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
With stagingAllowedLocalPath set, the kernel backend passes the allowed paths as the Volume options, so the kernel transfers the file of a PUT, GET or REMOVE inside execution. A Volume result then returns no rows, a failed transfer raises StagingError and a local file error is shaped like a Node fs error, as on Thrift. Removes the warning that ignored stagingAllowedLocalPath on the kernel backend. Pins KERNEL_REV to databricks-sql-kernel#521 and regenerates the native typings. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 2 Medium · 2 Low
Mostly sound — 1 medium concern. The kernel's Volume transfer is wired correctly through getResultMetadata in DBSQLSession, but removing the warning before the binding ships the feature causes a silent no-op.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
Other findings
- 🟡 Medium — If polling never starts or session close hangs, Mocha's timeout reports failure without interrupting these awaits, leaving the HTTP server and native work alive and potentially hanging the E2E job. Bound polling, execution, and close awaits explicitly, and ensure server teardown still runs when session cleanup times out. (Found by GPT-6.1 Sol · the judge couldn't confirm it)
| } | ||
| } | ||
|
|
||
| if (options.stagingAllowedLocalPath !== undefined) { |
There was a problem hiding this comment.
🟡 Medium — The platform packages remain pinned at 1.5.0 while only KERNEL_REV changed. A binding without ExecuteOptions.volume would silently run no transfer, and the old warning was removed. Keep a warning or fail until the binding is detected to support Volume options, or bump the package pins in this PR.
🔀 Found by Claude Opus 5.5 · confirmed by the judge
There was a problem hiding this comment.
Same release gate as #613 (comment). databricks/databricks-sql-kernel#520 and #521 are merged (KERNEL_REV now pins d18b044b), but the @databricks/databricks-sql-kernel-* pins and the lockfile can only move once a kernel release ships, so this stays open until then.
There was a problem hiding this comment.
Still open at 4d0f6fd: platform package pins are still 1.5.0, and there is no warning or capability check until a kernel release ships.
Pin the kernel to d18b044b, the databricks-sql-kernel main commit that merged #521 (Volume bindings, on #520). The bindings tree matches the commit this PR pinned before, plus #511 (configurable Arrow LZ4 compression) from kernel main. native/kernel/index.d.ts is regenerated with npm run build:native, which adds the lz4Compression execute option. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 2 Medium · 1 Low · 1 Nit
Needs changes: 2 medium concerns. The code changes look right once a kernel with #520/#521 is used, but the pinned 1.5.0 native packages can't run Volume transfers. The docs claim support anyway, and the removed warning means the gap now fails silently.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
Other findings
- ⚪ Nit — The new unit test covers only the default sync path. It doesn't cover the runAsync or Running-arm volume forwarding, or a volume:false backend with isVolumeOperation true. Add those cases. (Found by Claude Opus 5.5 · confirmed by the judge)
- 🟡 Medium — If polling never starts or close stalls, Mocha's timeout fails the test without interrupting these awaits, leaving the HTTP server open and potentially hanging the CI process indefinitely. Bound the polling, close, execution, and cleanup waits with explicit deadlines, and ensure server shutdown runs even when session cleanup times out. (Found by GPT-6.1 Sol · the judge couldn't confirm it)
…arry A local file error now takes its errno from libuv's error map, so on Windows it matches Node fs errors (-4058 for ENOENT) rather than the POSIX number. A Volume transfer StagingError keeps the kernel sqlState. Tests cover a non-Volume result run with the Volume options, and the staging-close e2e test bounds its waits so cleanup always runs. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 Low
Looks good, no blocking issues. The facade's getResultMetadata() waits on the fetch handle, so executeStatement resolves only after the transfer on all paths. Users get this only after the published kernel-* packages are bumped; the CHANGELOG says so.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
A close that hangs now fails the test, and the server still shuts down. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 2 Low
Mostly sound, with 1 medium concern: on the current native packages the Volume options are dropped silently. The facade's getResultMetadata() call makes executeStatement wait for the transfer on both execution paths, and the error shaping matches Thrift.
This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.
| * Thrift, which reads the instruction row to run it, such a result has no rows. | ||
| */ | ||
| private async transferredVolume(): Promise<boolean> { | ||
| return this.volume && (await this.getFetchHandle()).isVolumeOperation; |
There was a problem hiding this comment.
🔵 Low — The package.json pins still point at native 1.5.0, which ignores volume. On those builds isVolumeOperation is undefined, so no file moves and the instruction row is returned silently. The CHANGELOG notes the required bump but nothing checks it at runtime. Bump the pins together with this change, or warn or throw when the handle lacks isVolumeOperation.
🔀 Found by Claude Opus 5.5 · confirmed by the judge
There was a problem hiding this comment.
Same release gate as #613 (comment): the fix is bumping the @databricks/databricks-sql-kernel-* pins to a release that includes databricks/databricks-sql-kernel#520 and #521, not a runtime check, since this driver ships those pins. This stays open until that release.
There was a problem hiding this comment.
Still open at 9705b74: package.json:95-102 still pins every kernel platform at 1.5.0; keeping this open until the pins are bumped.
Feature or gap
With the kernel backend,
executeStatementignoresstagingAllowedLocalPath, so a SQLPUT,GETorREMOVEon a Unity Catalog Volume returns its instruction row and moves no file.What this PR addresses
The kernel now runs a Volume transfer inside execution (databricks/databricks-sql-kernel#520, #521). With
stagingAllowedLocalPathset, the kernel backend passes it as the Volume options (ExecuteOptions.volume):executeStatementresolves after the transfer, on both the sync andrunAsyncpaths.StagingError, and a local file error is shaped like a Node fs error (code,errno,path).stagingAllowedLocalPath, a Volume statement returns its instruction row like any other query, as on Thrift.socketTimeoutis the transfer's idle limit.The warning that ignored
stagingAllowedLocalPathon the kernel backend is removed.KERNEL_REVmoves to databricks/databricks-sql-kernel#521, andnative/kernel/index.d.tsis regenerated withnpm run build:native(NAPI-RS CLI 3.8.2).Dependencies
Users get the change only after a kernel release that includes #520 and #521, with every
@databricks/databricks-sql-kernel-*platform package and the lockfile bumped to it.KERNEL_REVselects the source for local and CI builds only.Tests and validation
stagingAllowedLocalPathbecomes the Volume options, that a Volume result returns no rows, and that a failed transfer raisesStagingError.tsc --noEmit, ESLint and Prettier pass.tests/e2e/utils/stagingTests.ts) and a close-during-transfer test against a warehouse.This pull request and its description were written by Isaac.