Repository navigation
test(kernel): capture kernel-owned telemetry in the error-category E2E - #603
Merged
Merged
Conversation
TestKernelE2EErrorTelemetryCategory has failed every nightly kernel run since 2026-08-28. Kernel connections stopped using the Go telemetry interceptor in #451 and the kernel now exports telemetry from its own HTTP client, so the test's Go RoundTripper captured nothing. Route the kernel through a local CONNECT proxy that re-signs TLS with a test CA (trusted via WithKernelTrustedCerts) and records /telemetry-ext bodies. Assert the failed statement's EXECUTE_STATEMENT event carries the kernel's code-derived error_name (SqlError), the SQLSTATE in stack_trace, and the statement id. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
The Reyden leg of the kernel nightly rejects INSERT INTO with 0A000 before resolving the table, so the 42P01 precondition failed there. A missing-table SELECT fails with 42P01 on both legs (TestKernelE2EErrorSurface already relies on it); the telemetry assertions are unchanged. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
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.
Problem
TestKernelE2EErrorTelemetryCategoryhas failed on every Nightly E2E kernel run since 2026-08-28 (captured error names=[]; latest: run 46236039827). It last passed on 08-27. #451 landed on 08-28 and moved telemetry for kernel-backed connections into the kernel:Connectskips the Go interceptor (shouldSkipDriverTelemetry), and the kernel exports/telemetry-extfrom its own Rust HTTP client. The test still read Go'shttp.RoundTripper, so it could never see an event. It also still expected the Go categoryexecute_statement_failed, which the kernel doesn't emit.This is a stale test, not a driver regression. The kernel names errors with its
ErrorCodeslug (telemetry/runtime.rssanitize_error), and the other kernel-backed drivers report the same names. A live capture against the test warehouse shows the kernel exports CREATE_SESSION, EXECUTE_STATEMENT and DELETE_SESSION stampeddatabricks-sql-go. The failed statement's event carrieserror_info {error_name: "SqlError", stack_trace: "42P01"}.Fix
The test now routes the kernel through a local CONNECT proxy. The proxy re-signs TLS with a test CA, which the kernel trusts through
WithKernelTrustedCerts, so verification stays on. It records/telemetry-extbodies and forwards everything to the real workspace. The test asserts that the failed statement's EXECUTE_STATEMENT event (matched by query id) haserror_name == "SqlError"andstack_traceequal to the error's SQLSTATE. Closing the last kernel session on a host flushes the kernel's pending telemetry beforeClosereturns, so the test reads results without sleeping. Test-only change; the workflow already selects this test.Verification
KERNEL_REV): 10/10 passes in one process (0.47–0.62s each). The full nightly kernel selection (-run 'TestKernelE2E|…' -skip TestKernelE2EM2M) is green.enableTelemetry=false, or with it left to this workspace's feature flag, the kernel exports nothing, so the assertion can fail.INSERT INTOwith 0A000, so the test now uses a missing-tableSELECT. That fails with 42P01 on both legs, the same formTestKernelE2EErrorSurfaceuses. Re-run: 46297044803.go vet -tags databricks_kernel,e2e .and golangci-lint with the kernel tags report nothing new.This pull request and its description were written by Isaac.