Skip to content

Commit 31ca581

Browse files
fix(backend/kernel): defer databricks-sql-kernel poetry dep declaration
CI is failing across all jobs at \`poetry lock\` time: Because databricks-sql-connector depends on databricks-sql-kernel (^0.1.0) which doesn't match any versions, version solving failed. The kernel wheel isn't yet published to PyPI — we verified the name is available via the Databricks proxy, but the package itself hasn't been built and uploaded yet. Declaring it as a poetry dep (even an optional one inside an extra) requires the version to be resolvable, and \`poetry lock\` runs as the setup step for every CI job: unit tests, linting, type checks, all of them. Fix: drop the \`databricks-sql-kernel\` dep declaration and the \`[kernel]\` extra from pyproject.toml until the wheel is on PyPI. The lazy import in \`backend/kernel/client.py\` still raises a clear ImportError pointing at \`pip install databricks-sql-kernel\` (or local maturin) when use_sea=True is invoked without the kernel present. When the kernel is published, a small follow-up will add back: databricks-sql-kernel = {version = "^0.1.0", optional = true} [tool.poetry.extras] kernel = ["databricks-sql-kernel"] A pointed comment in pyproject.toml documents the deferred change. Co-authored-by: Isaac Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
1 parent 6b30815 commit 31ca581

2 files changed

Lines changed: 19 additions & 7 deletions

File tree

pyproject.toml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,24 @@ pyarrow = [
3232
pyjwt = "^2.0.0"
3333
pybreaker = "^1.0.0"
3434
requests-kerberos = {version = "^0.15.0", optional = true}
35-
# Optional kernel backend: `pip install 'databricks-sql-connector[kernel]'`
36-
# unlocks use_sea=True, which routes through the Rust kernel via PyO3.
37-
# Without it, use_sea=True raises a pointed ImportError. The kernel
38-
# wheel itself ships from the databricks-sql-kernel repo.
39-
databricks-sql-kernel = {version = "^0.1.0", optional = true}
4035

4136

4237
[tool.poetry.extras]
4338
pyarrow = ["pyarrow"]
44-
kernel = ["databricks-sql-kernel"]
39+
# `[kernel]` extra is intentionally not declared here yet.
40+
# `databricks-sql-kernel` is built from the databricks-sql-kernel
41+
# repo and not yet published to PyPI; declaring it as a poetry dep
42+
# breaks `poetry lock` for every CI job. Once the wheel is on PyPI
43+
# the extra will be added back here:
44+
#
45+
# databricks-sql-kernel = {version = "^0.1.0", optional = true}
46+
# [tool.poetry.extras]
47+
# kernel = ["databricks-sql-kernel"]
48+
#
49+
# Until then, install the kernel separately:
50+
# pip install databricks-sql-kernel
51+
# or (local dev):
52+
# cd databricks-sql-kernel/pyo3 && maturin develop --release
4553

4654
[tool.poetry.group.dev.dependencies]
4755
pytest = "^7.1.2"

src/databricks/sql/backend/kernel/client.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,13 @@
6666
try:
6767
import databricks_sql_kernel as _kernel # type: ignore[import-not-found]
6868
except ImportError as exc: # pragma: no cover - import-time error surfaces clearly
69+
# The `databricks-sql-kernel` wheel is not yet on PyPI, so we
70+
# don't yet declare it as an optional extra in pyproject.toml
71+
# (doing so breaks `poetry lock`). Once published the install
72+
# hint will move to `pip install 'databricks-sql-connector[kernel]'`.
6973
raise ImportError(
7074
"use_sea=True requires the databricks-sql-kernel package. Install it with:\n"
71-
" pip install 'databricks-sql-connector[kernel]'\n"
75+
" pip install databricks-sql-kernel\n"
7276
"or for local development from the kernel repo:\n"
7377
" cd databricks-sql-kernel/pyo3 && maturin develop --release"
7478
) from exc

0 commit comments

Comments
 (0)