GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: include statement IDs in Thrift failure telemetry by AliAbouelazm · Pull Request #987 · databricks/databricks-sql-python

Conversation

@AliAbouelazm

@AliAbouelazm AliAbouelazm commented Oct 16, 2026

Copy link
Copy Markdown

What type of PR is this?

  • Bug Fix

Description

Thrift failure events could not be correlated with their statements because Error and export_failure_log did not accept a SQL statement ID. The operation handle was already available when most of these errors were raised.

This change adds an optional statement ID to the failure-telemetry interface and forwards the current response or request handle through statement, polling, direct-result, and request errors. Result-format and fetch-offset validation errors also carry the available ID. The current session ID is supplied explicitly so a shared telemetry client does not attribute the error to another connection.

The error-message payload is unchanged. No SQL text, diagnostic context, or operation secret is added to the event. Failures before a statement handle is available continue to omit the statement ID, and disabled telemetry accepts the optional argument.

How is this tested?

  • Unit tests

The 22 new regression cases exercise real Thrift error paths with mocked RPCs and inspect serialized telemetry events. They cover direct and polled failures, both server-message forms, every direct-result error field, synchronous and asynchronous submission, request failures, unavailable handles, connection failures, closed statements, result validation, and disabled telemetry. They also verify that SQL and operation secrets are absent from exported events.

On unchanged main, these tests produce 20 failures and 2 passes. With the fix, all 22 pass with network sockets disabled.

Full unit suite on Python 3.12 with PyArrow: 1,268 passed, 5 skipped, 1 realkernel test deselected, and 351 subtests passed. The run used --disable-socket with proxy variables removed from the test process so the existing HTTP fixtures select their mocked pool.

black --check src, Black on the new test file, mypy src, and git diff --check pass. Live Databricks E2E tests and the real-kernel tier were not run.

Related Tickets & Documents

Addresses the Thrift TELEMETRY-002 finding in #927. The other findings remain outside this change.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@AliAbouelazm
fix: include statement IDs in Thrift failure telemetry
c4595fe
Signed-off-by: Ali Abouelazm <[email protected]>
@AliAbouelazm
AliAbouelazm marked this pull request as ready for review October 16, 2026 07:51
AliAbouelazm added 3 commits October 27, 2026 10:54
@AliAbouelazm
Merge upstream main and preserve unreleased telemetry note
dc50985
Signed-off-by: Ali Abouelazm <[email protected]>
@AliAbouelazm
Merge upstream main and preserve both unreleased changelog entries
18d0846
Signed-off-by: Ali Abouelazm <[email protected]>
@AliAbouelazm
Merge upstream main and preserve unreleased telemetry entry
ed90ee2
Keep the Thrift failure telemetry entry under Unreleased while preserving
the upstream 4.9.0 release notes and dependency updates.

Signed-off-by: Ali Abouelazm <[email protected]>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@AliAbouelazm
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.