Repository navigation
Run Volume PUT, GET and REMOVE through the kernel backend #560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
e4a73e0
3ef8001
4d71e38
efc80cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| a29235cbea9532efa5572ebff010045583a19cbe | ||
| d18b044bdd8d6a3ef7c7dd763a5f38c1532a213f |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,7 +38,9 @@ import "C" | |
| import ( | ||
| "context" | ||
| "fmt" | ||
| "os" | ||
| "runtime" | ||
| "syscall" | ||
| "unsafe" | ||
|
|
||
| "github.com/databricks/databricks-sql-go/v2/driverctx" | ||
|
|
@@ -178,6 +180,11 @@ func lastError(code C.KernelStatusCode) *KernelError { | |
| if e.query_id != nil { | ||
| ke.QueryID = C.GoString(e.query_id) | ||
| } | ||
| ke.ErrorCode = C.GoString(C.kernel_get_last_error_code()) | ||
|
aakash-saravanan-db marked this conversation as resolved.
Resolved
aakash-saravanan-db marked this conversation as resolved.
Resolved
aakash-saravanan-db marked this conversation as resolved.
Resolved
aakash-saravanan-db marked this conversation as resolved.
Resolved
aakash-saravanan-db marked this conversation as resolved.
Resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 High — The cgo shim now calls new kernel ABI symbols (kernel_get_last_error_code, kernel_result_stream_complete_volume_operation), but go.mod still pins the published bindings at v1.5.0. Only the source-built KERNEL_REV changes, so consumers using the default prebuilt archives may fail to link. Bump all platform bindings pins and go.sum to a release that exports these symbols. 🔀 Found by GPT-6.1 Sol · confirmed by the judge
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Duplicate of the release gate in #560 (comment). The v1.5.0 bindings archives lack these symbols, so the seven bindings modules in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still open at 16adbcd: go.mod:63-69 pins all seven bindings at v1.5.0, which lacks these symbols; this stays a merge blocker.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocked on the kernel release, so I'm leaving this open: the cgo calls need databricks/databricks-sql-kernel#520 and #521 merged and a bindings release that includes them, and the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still open at b884e82: go.mod:63-69 still pins all seven bindings at v1.5.0; this blocks merge until the kernel release lands and the pins move to it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 High — The PR calls new kernel C ABI symbols (kernel_result_stream_complete_volume_operation, kernel_get_last_error_code and others) and bumps KERNEL_REV. go.mod and go.sum still pin the published v1.5.0 bindings, so installed-driver builds may fail to link. Bump all platform bindings pins to a release that exports these symbols, or split the change. 🔀 Found by GPT-6.1 Sol · confirmed by the judge
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Duplicate of the release gate in #560 (comment). The v1.5.0 bindings archives lack these symbols, so the seven bindings modules in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still open at 16adbcd: all seven bindings modules are still pinned to v1.5.0 (go.mod:63-69), and that release lacks these symbols.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocked on the kernel release, so I'm leaving this open: the cgo calls need databricks/databricks-sql-kernel#520 and #521 merged and a bindings release that includes them, and the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still open at b884e82: go.mod:63-69 still pins all seven bindings modules to v1.5.0, which lacks the new symbols; merge blocker. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 High — The PR calls new kernel ABI symbols (kernel_get_last_error_code, kernel_result_stream_complete_volume_operation) unconditionally, but go.mod still pins every platform bindings module at v1.5.0. The repo's own lessons (L-0030) say a KERNEL_REV bump alone isn't enough. Bump the go.mod/go.sum pins to a bindings release that exports these symbols, or gate the change on that release. 🔀 Found by GPT-6.1 Sol · confirmed by the judge
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocked on the kernel release, so I'm leaving this open: the cgo calls need databricks/databricks-sql-kernel#520 and #521 merged and a bindings release that includes them, and the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still open at b884e82: cgo.go:183 calls new symbols, but the go.mod bindings pins are still v1.5.0. Waiting on the kernel release. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 High — The change calls new C symbols such as kernel_get_last_error_code and kernel_result_stream_complete_volume_operation, and it bumps KERNEL_REV. go.mod still pins every kernel-bindings platform module at v1.5.0, which predates these symbols. Tagged builds that link the published modules (not make kernel-lib) will probably fail to link or fail at runtime. Bump the per-platform module versions and go.sum to the matching bindings release, then check a tagged build against the installed modules. 🔀 Found by GPT-6.1 Sol · confirmed by the judge
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocked on the kernel release, so I'm leaving this open: the cgo calls need databricks/databricks-sql-kernel#520 and #521 merged and a bindings release that includes them, and the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still open at b884e82: go.mod still pins kernel-bindings v1.5.0, which lacks kernel_get_last_error_code (cgo.go:183). Bump the pins once the bindings release ships. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 High — The shim now calls new ABI symbols (kernel_get_last_error_code, kernel_result_stream_complete_volume_operation, etc.), but go.mod still pins every bindings module at v1.5.0. KERNEL_REV only affects source-built archives, so installed-driver kernel builds may not link. Bump the platform bindings pins and go.sum to a release that exports these symbols, or gate the merge on that release. 🔀 Found by GPT-6.1 Sol · confirmed by the judge
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocked on the kernel release, so I'm leaving this open: the cgo calls need databricks/databricks-sql-kernel#520 and #521 merged and a bindings release that includes them, and the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 High — cgo.go now calls kernel_get_last_error_code and the Volume completion symbols. go.mod still pins the published bindings modules at v1.5.0, and the diff only bumps KERNEL_REV. Default (non-source-built) kernel builds may fail to link. Bump every platform module and go.sum to a bindings release that exports these symbols, then check a clean consumer build. 🔀 Found by GPT-6.1 Sol · confirmed by the judge
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same release gate as #560 (comment). databricks/databricks-sql-kernel#520 and #521 are merged (KERNEL_REV now pins d18b044b), but the bindings modules and sums in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still open at 4d71e38: go.mod:63-69 pins all bindings modules at v1.5.0; bump them and go.sum once the bindings release ships. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 High — The code now calls new kernel C ABI symbols (kernel_result_stream_complete_volume_operation, kernel_get_last_error_code and others), but go.mod and go.sum still pin the published bindings at v1.5.0, which lack them. Tagged builds from installed consumers will therefore fail to link. Publish the matching bindings release, bump all platform pins and sums, and verify a clean build. 🔀 Found by GPT-6.1 Sol · confirmed by the judge
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same release gate as #560 (comment). databricks/databricks-sql-kernel#520 and #521 are merged (KERNEL_REV now pins d18b044b), but the bindings modules and sums in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still open at 4d71e38: go.mod/go.sum still pin bindings v1.5.0, which lack the new ABI symbols; this is blocked until a bindings release ships. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 High — The new C symbols (kernel_get_last_error_code, kernel_statement_set_volume_options) are only in the newer kernel, but go.mod still pins the bindings at v1.5.0, so a databricks_kernel build that uses the published archives can't link. Bump the bindings modules and go.sum to a release that has these APIs before releasing. Source builds through KERNEL_REV and the Makefile are unaffected. 🔀 Found by both reviewers · confirmed by the judge
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same release gate as #560 (comment). databricks/databricks-sql-kernel#520 and #521 are merged (KERNEL_REV now pins d18b044b), but the bindings modules and sums in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still open at 4d71e38: go.mod:63-69 still pin the bindings at v1.5.0, so this release gate remains outstanding. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 High — The shim now calls new kernel symbols (kernel_get_last_error_code, kernel_statement_set_volume_options, kernel_executed_statement_is_volume_operation), but go.mod and go.sum still pin bindings v1.5.0. Only KERNEL_REV changed, so default tagged builds will likely fail to link. Publish the matching bindings release and bump every platform module in go.mod and go.sum. 🔀 Found by both reviewers · confirmed by the judge
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same release gate as #560 (comment). databricks/databricks-sql-kernel#520 and #521 are merged (KERNEL_REV now pins d18b044b), but the bindings modules and sums in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still open at 4d71e38: go.mod:63-69 pins all bindings at v1.5.0; bump them and go.sum after the bindings release. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 High — The shim calls new C symbols ( 🔀 Found by both reviewers · confirmed by the judge
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same release gate as #560 (comment). databricks/databricks-sql-kernel#520 and #521 are merged (KERNEL_REV now pins d18b044b), but the bindings modules and sums in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still open at efc80cd: go.mod and go.sum still pin bindings v1.5.0. They need to move to the bindings release that exports these symbols. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 High — The new C calls (kernel_get_last_error_code, kernel_statement_set_volume_options, and the is_volume_operation functions) need a newer kernel. go.mod still pins every bindings archive to v1.5.0, so consumer builds with databricks_kernel can fail to link. Bump the go.mod and go.sum pins to a release with the new ABI before releasing. The Makefile's KERNEL_REV source build avoids this only for development. 🔀 Found by both reviewers · confirmed by the judge
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same release gate as #560 (comment). databricks/databricks-sql-kernel#520 and #521 are merged (KERNEL_REV now pins d18b044b), but the bindings modules and sums in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still open at efc80cd: go.mod/go.sum still pin bindings v1.5.0, so this blocks release until the new bindings ship. |
||
| if code := C.kernel_get_last_error_local_os_error(); code != 0 { | ||
| // The C ABI reports a path and errno without a syscall name. | ||
| ke.cause = &os.PathError{Op: "file", Path: C.GoString(C.kernel_get_last_error_local_path()), Err: syscall.Errno(code)} | ||
| } | ||
| klog("kernel error: code=%d sqlstate=%q vendor=%d http=%d retryable=%v msg=%q", | ||
| ke.Code, ke.SQLState, ke.VendorCode, ke.HTTPStatus, ke.Retryable, ke.Message) | ||
| // Also emit through the driver's logger — no SQL text or PII, just the | ||
|
|
@@ -188,7 +195,7 @@ func lastError(code C.KernelStatusCode) *KernelError { | |
| // User/query faults (bad SQL, bad argument) are routine and log at Debug so they | ||
| // don't inflate the WARN rate on-call alerts key on; infra codes stay at Warn. | ||
| msg := "databricks: kernel call failed: code=%d sqlstate=%q vendor=%d http=%d retryable=%v queryId=%q" | ||
| if isUserFault(ke.Code) { | ||
| if isUserFault(ke.Code, ke.ErrorCode) { | ||
| logger.Logger.Debug().Msgf(msg, ke.Code, ke.SQLState, ke.VendorCode, ke.HTTPStatus, ke.Retryable, ke.QueryID) | ||
| } else { | ||
| logger.Logger.Warn().Msgf(msg, ke.Code, ke.SQLState, ke.VendorCode, ke.HTTPStatus, ke.Retryable, ke.QueryID) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.