Repository navigation
fix(kernel): decode a failed async status poll into the driver error - #608
Open
vuanhphung wants to merge 1 commit into
Open
vuanhphung wants to merge 1 commit into
vuanhphung wants to merge 1 commit into
Conversation
On a runAsync: true statement, waitUntilReady() and status() awaited the napi AsyncStatement.status() without decodeNapiKernelError, so a failed poll (for example, retries exhausted on HTTP 500) reached the caller as a raw Error whose message is the __databricks_error__:{...} envelope. Decode it like the other napi calls.
Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 08:28 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 08:28 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 08:28 — with
GitHub Actions
Inactive
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On the kernel backend, a failed status poll on a
runAsync: truestatement reaches the caller as a rawErrorwhose message is the binding's internal envelope, e.g.__databricks_error__:{"code":"Internal","httpStatus":500,"message":"HTTP 500: Internal Server Error"}.waitUntilReady()andstatus()awaitAsyncStatement.status()directly (lib/kernel/KernelOperationBackend.ts:429,:627), while every other napi call on this path goes throughdecodeNapiKernelError. Found by the databricks-driver-test RESULTFETCH-013 SEA test (a persistent HTTP 500 on GetStatementStatus) againstmain7be705e.This routes both calls through one
pollAsyncStatus()helper that decodes the rejection. The error becomes the mapped driver error (HiveDriverError: HTTP 500: Internal Server Errorwith the boundedcause), and its SQLSTATE andkernelMetadataare preserved like on the fetch path.Verification: a new unit test in
tests/unit/kernel/execution.test.tsfails onmain(expected Error: __databricks_error__:{"code":"Inte… to be an instance of HiveDriverError) and passes with the fix.npm test(1752 passing),npm run lint,npm run prettierandnpm run type-checkare clean. Live, the RESULTFETCH-013 SEA test (databricks/databricks-driver-test#2068) now reportsHTTP 500: Internal Server Errorinstead of the envelope.This pull request and its description were written by Isaac.