Repository navigation
refactor!: remove the deprecated use_sea backend - #1073
Open
aakash-saravanan-db wants to merge 2 commits into
Open
aakash-saravanan-db wants to merge 2 commits into
aakash-saravanan-db wants to merge 2 commits into
Conversation
The pure-Python SEA backend is superseded by use_kernel=True. Delete backend/sea/ with its unit tests and experimental examples, and drop the use_sea cases from the e2e suites. connect() now raises ValueError for use_sea=True before any auth, HTTP client or telemetry setup, pointing callers to use_kernel=True. The SEA-only use_hybrid_disposition and max_connections options are gone. SqlType moves into kernel/type_mapping.py, its only remaining user. Connection.__del__ now tolerates a Connection whose __init__ raised before a session was assigned. Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com> Co-authored-by: Isaac <no-reply@databricks.com>
HTTP429Suite and HTTP503Suite have not been collected since #352 moved their base class off unittest.TestCase: their names do not match pytest's Test* pattern. They also needed a server that returns real 429/503 responses. Remove them together with the mixins and the PySQLPytestTestCase attributes only they used. Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com> Co-authored-by: Isaac <no-reply@databricks.com>
aakash-saravanan-db
temporarily deployed
to
azure-prod
November 21, 2026 01:03 — with
GitHub Actions
Inactive
aakash-saravanan-db
temporarily deployed
to
azure-prod
November 21, 2026 01:03 — with
GitHub Actions
Inactive
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).
No issues identified in the part of the change that was reviewed.
Review incomplete
This review did not cover the whole change, so it is posted as a comment and does not approve the PR. Review the items below by hand, or split the PR so the bot can cover all of it:
- The PR diff exceeded the 200,000-byte review cap, so 19 test hunk(s) were not shown to the reviewer (tests:
tests/unit/test_filters.py,tests/unit/test_lazy_thrift_import.py,tests/unit/test_sea_backend.py,tests/unit/test_sea_conversion.py,tests/unit/test_sea_http_client.py,tests/unit/test_sea_queue.py,tests/unit/test_sea_result_set.py,tests/unit/test_session.py,tests/unit/test_telemetry.py); no production code was dropped.
vuanhphung
approved these changes
Nov 21, 2026
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.
What type of PR is this?
Description
Removes the deprecated pure-Python SEA backend (
use_sea=True).use_kernel=True(the Rust kernel) is the supported SEA-native path.Behavior changes
use_sea=Truenow raisesValueErrorat the top ofConnection.__init__, before any auth, HTTP client or telemetry setup. The message points callers touse_kernel=Trueand the[kernel]extra.use_sea=Falseis still accepted.use_hybrid_dispositionandmax_connectionsoptions are removed and ignored if passed.DriverConnectionParameters.modeis alwaysTHRIFT. Kernel connections already computedTHRIFThere, sinceuse_seawas false on that path.enable_sea_hybrid_resultsis no longer populated.Connection.__del__no longer raises when__init__failed before a session was assigned. Previously Python printedException ignored in __del__: AttributeErrornext to the real error, and the newuse_seaerror is the most common way to hit that path.Code
src/databricks/sql/backend/sea/andCommandState.from_sea_state, which only SEA used.SqlTypeintobackend/kernel/type_mapping.py, its only remaining user, keeping the 15 constants the kernel references.BackendType.SEA,SessionId.from_sea_session_idandCommandId.from_sea_statement_id: the kernel backend builds its session and statement IDs with them.Session._create_backendand from the Reyden auto-recovery check.Tests and docs
test_sea_*.py,test_filters.py) andexamples/experimental/.{"use_sea": True}cases from the e2e suites. Only the default case remained, so theextra_paramsparametrize and argument are removed from those tests.HTTP429Suite/HTTP503Suiteand their mixins. These have not been collected since Prep for Test Automation #352 moved their base class offunittest.TestCase, because their names do not match pytest'sTest*pattern. They also needed a server that returns real 429/503 responses.CONNECTION_PARAMETERS.md,CONTRIBUTING.md, the engineer bot prompt andCHANGELOG.md.Follow-up: coverage for the deleted 429/503 suites
We will make sure each behavior those suites targeted is covered by a test that actually runs in CI, either by confirming the existing coverage below or by adding a test:
Retry-Aftertest_retry_max_count_not_exceededandtest_retry_exponential_backoff(PySQLRetryTestsMixin, run viaTestPySQLCoreSuiteincode-coverage.yml) andtests/unit/test_retry.pytest_retry_safe_execute_statement_retry_conditiontest_retry_safe_execute_statement_retry_conditionOperationalErrorcontainingTEMPORARILY_UNAVAILABLEHow is this tested?
Unit tests
E2E Tests
Manually
N/A
pytest tests/unit -m "not realkernel": 1298 passed, 4 skipped.New
test_use_sea_rejected_before_any_setupchecks thatuse_sea=Trueraises before any HTTP client or Thrift client is created.New
test_rejected_connect_finalizes_quietlyfails without the__del__guard (verified by removing it) and passes with it.black --check srcis clean.E2E suites were not run locally;
code-coverage.ymlruns them on this PR.pytest --collect-only tests/e2e/test_driver.pycollects the same 99 tests before and after the suite deletion.Related Tickets & Documents
N/A
This pull request and its description were written by Isaac.