Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 24 additions & 16 deletions .github/scripts/envgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

* Names normalized - lowercased, ``_``/``.`` -> ``-`` (Cython -> cython).
* ``==`` -> ``~=`` - allow security/patch bumps within a minor.
* databricks-sdk - widened to ``~=MAJOR.MINOR`` (``>=X.Y, <X+1``) instead of the
default single-patch-line pin, because databricks-connect
(installed from the dev group) declares its own databricks-sdk
floor which can be newer than the release-notes table lists.
See ``req`` for the full rationale.
* connect-governed - databricks-sdk, grpcio and grpcio-status are widened to
widened ``~=MAJOR.MINOR`` instead of the default single-patch pin,
because databricks-connect (installed from the dev group)
governs their versions and can require outside the runtime's
patch line. See ``req`` (CONNECT_GOVERNED) / issues #16,#19,#20.
* databricks-connect - pinned to ``~=MAJOR.MINOR.0`` and emitted into
``[dependency-groups].dev`` of the pyproject (installed by
default under uv); omitted from constraints.txt so the pip
Expand Down Expand Up @@ -81,6 +81,12 @@
"serverless-v3": {"pandas": "1.5."},
}

# Packages whose exact version databricks-connect (installed from the dev group)
# governs, and can require outside the runtime's patch line. Their pin is widened to
# ~=MAJOR.MINOR so the runtime version stays the floor while databricks-connect's own
# metadata (and wheel availability) picks the version in-range. See req() / issue #16.
CONNECT_GOVERNED = {"databricks-sdk", "grpcio", "grpcio-status"}


def norm(name):
# Strip the '*' footnote marker the release-notes tables append to some package
Expand All @@ -99,19 +105,21 @@ def req(name, version):
Ubuntu system builds like ``python-apt 2.7.7+ubuntu5.2`` would strip to a bogus
PyPI pin, so those are dropped by name in ``DROP`` before reaching here.

``databricks-sdk`` is a special case. It moves in lockstep with
``databricks-connect``, which is installed from PyPI in the dev group and declares
its own ``databricks-sdk`` floor — and that floor can be *newer* than the version
the release-notes "Installed Python libraries" table lists (e.g. DBR 18.2 lists
``databricks-sdk 0.67.0``, but ``databricks-connect~=18.2.0`` requires
``databricks-sdk>=0.93,<1``). Pinning it to a single patch line (``~=0.67.0`` →
``>=0.67.0,<0.68``) then makes ``uv sync`` unresolvable. Widening it to its
``MAJOR.MINOR`` (``~=0.67`` → ``>=0.67,<1``) keeps the runtime's version as the
floor while letting databricks-connect's own metadata govern the exact version
within that window. See issue #16.
``databricks-sdk``, ``grpcio`` and ``grpcio-status`` (CONNECT_GOVERNED) are a
special case: they move in lockstep with ``databricks-connect``, which is installed
from PyPI in the dev group and governs their versions — and its requirement can be
*newer* than the version the release-notes "Installed Python libraries" table lists
(e.g. DBR 18.2 lists ``databricks-sdk 0.67.0`` but ``databricks-connect~=18.2.0``
requires ``databricks-sdk>=0.93,<1``; DBR 14.3 lists ``grpcio-status 1.48.1`` but
connect requires ``grpcio-status>=1.56``). A single-patch-line pin (``~=0.67.0`` →
``>=0.67.0,<0.68``) then makes ``uv sync`` unresolvable, and an old patch line can
also lack a wheel for the local platform (``grpcio 1.48.x`` has no macOS-arm64
wheel). Widening to ``MAJOR.MINOR`` (``~=0.67`` → ``>=0.67,<1``) keeps the runtime's
version as the floor while letting databricks-connect's metadata and wheel
availability pick the exact version in-range. See issues #16, #19, #20.
"""
version = version.split("+", 1)[0]
if name == "databricks-sdk":
if name in CONNECT_GOVERNED:
version = ".".join(version.split(".")[:2])
return f"{name}~={version}"

Expand Down
8 changes: 8 additions & 0 deletions .github/scripts/test_envgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ def test_compatible_release_default(self):
def test_databricks_sdk_widened_to_major_minor(self):
self.assertEqual(req("databricks-sdk", "0.67.0"), "databricks-sdk~=0.67")

def test_grpc_family_widened_to_major_minor(self):
# grpcio / grpcio-status move with databricks-connect (installed from the dev
# group), which can require a version outside the runtime's patch line — so
# widen them to MAJOR.MINOR like databricks-sdk, keeping the runtime as floor.
self.assertEqual(req("grpcio", "1.48.2"), "grpcio~=1.48")
self.assertEqual(req("grpcio-status", "1.48.1"), "grpcio-status~=1.48")
self.assertEqual(req("grpcio", "1.67.0"), "grpcio~=1.67")


class BuildArtifactsTest(unittest.TestCase):
# torchmetrics is a real ML package that must survive; it also guards against a
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/13.3.x-cpu-ml-scala2.12/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ google-pasta~=0.2.0
google-resumable-media~=2.5.0
googleapis-common-protos~=1.56.4
greenlet~=1.1.1
grpcio~=1.48.1
grpcio-status~=1.48.1
grpcio~=1.48
grpcio-status~=1.48
gunicorn~=20.1.0
gviz-api~=1.10.0
h11~=0.14.0
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/13.3.x-cpu-ml-scala2.12/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ constraint-dependencies = [
"google-resumable-media~=2.5.0",
"googleapis-common-protos~=1.56.4",
"greenlet~=1.1.1",
"grpcio~=1.48.1",
"grpcio-status~=1.48.1",
"grpcio~=1.48",
"grpcio-status~=1.48",
"gunicorn~=20.1.0",
"gviz-api~=1.10.0",
"h11~=0.14.0",
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/13.3.x-gpu-ml-scala2.12/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ google-pasta~=0.2.0
google-resumable-media~=2.5.0
googleapis-common-protos~=1.56.4
greenlet~=1.1.1
grpcio~=1.48.1
grpcio-status~=1.48.1
grpcio~=1.48
grpcio-status~=1.48
gunicorn~=20.1.0
gviz-api~=1.10.0
h11~=0.14.0
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/13.3.x-gpu-ml-scala2.12/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ constraint-dependencies = [
"google-resumable-media~=2.5.0",
"googleapis-common-protos~=1.56.4",
"greenlet~=1.1.1",
"grpcio~=1.48.1",
"grpcio-status~=1.48.1",
"grpcio~=1.48",
"grpcio-status~=1.48",
"gunicorn~=20.1.0",
"gviz-api~=1.10.0",
"h11~=0.14.0",
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/13.3.x-scala2.12/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ fastjsonschema~=2.18.0
filelock~=3.12.2
fonttools~=4.25.0
googleapis-common-protos~=1.56.4
grpcio~=1.48.1
grpcio-status~=1.48.1
grpcio~=1.48
grpcio-status~=1.48
httplib2~=0.20.2
idna~=3.3
importlib-metadata~=4.6.4
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/13.3.x-scala2.12/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ constraint-dependencies = [
"filelock~=3.12.2",
"fonttools~=4.25.0",
"googleapis-common-protos~=1.56.4",
"grpcio~=1.48.1",
"grpcio-status~=1.48.1",
"grpcio~=1.48",
"grpcio-status~=1.48",
"httplib2~=0.20.2",
"idna~=3.3",
"importlib-metadata~=4.6.4",
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/14.3.x-cpu-ml-scala2.12/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ google-pasta~=0.2.0
google-resumable-media~=2.7.0
googleapis-common-protos~=1.62.0
greenlet~=2.0.1
grpcio~=1.48.2
grpcio-status~=1.48.1
grpcio~=1.48
grpcio-status~=1.48
gunicorn~=20.1.0
gviz-api~=1.10.0
h5py~=3.7.0
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/14.3.x-cpu-ml-scala2.12/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ constraint-dependencies = [
"google-resumable-media~=2.7.0",
"googleapis-common-protos~=1.62.0",
"greenlet~=2.0.1",
"grpcio~=1.48.2",
"grpcio-status~=1.48.1",
"grpcio~=1.48",
"grpcio-status~=1.48",
"gunicorn~=20.1.0",
"gviz-api~=1.10.0",
"h5py~=3.7.0",
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/14.3.x-gpu-ml-scala2.12/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ google-pasta~=0.2.0
google-resumable-media~=2.7.0
googleapis-common-protos~=1.62.0
greenlet~=2.0.1
grpcio~=1.48.2
grpcio-status~=1.48.1
grpcio~=1.48
grpcio-status~=1.48
gunicorn~=20.1.0
gviz-api~=1.10.0
h5py~=3.7.0
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/14.3.x-gpu-ml-scala2.12/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ constraint-dependencies = [
"google-resumable-media~=2.7.0",
"googleapis-common-protos~=1.62.0",
"greenlet~=2.0.1",
"grpcio~=1.48.2",
"grpcio-status~=1.48.1",
"grpcio~=1.48",
"grpcio-status~=1.48",
"gunicorn~=20.1.0",
"gviz-api~=1.10.0",
"h5py~=3.7.0",
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/14.3.x-scala2.12/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ fastjsonschema~=2.19.1
filelock~=3.13.1
fonttools~=4.25.0
googleapis-common-protos~=1.62.0
grpcio~=1.48.2
grpcio-status~=1.48.1
grpcio~=1.48
grpcio-status~=1.48
httplib2~=0.20.2
idna~=3.4
importlib-metadata~=4.6.4
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/14.3.x-scala2.12/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ constraint-dependencies = [
"filelock~=3.13.1",
"fonttools~=4.25.0",
"googleapis-common-protos~=1.62.0",
"grpcio~=1.48.2",
"grpcio-status~=1.48.1",
"grpcio~=1.48",
"grpcio-status~=1.48",
"httplib2~=0.20.2",
"idna~=3.4",
"importlib-metadata~=4.6.4",
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/15.4.x-cpu-ml-scala2.12/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ google-pasta~=0.2.0
google-resumable-media~=2.7.1
googleapis-common-protos~=1.63.0
greenlet~=2.0.1
grpcio~=1.60.0
grpcio-status~=1.60.0
grpcio~=1.60
grpcio-status~=1.60
gunicorn~=20.1.0
gviz-api~=1.10.0
gymnasium~=0.28.1
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/15.4.x-cpu-ml-scala2.12/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ constraint-dependencies = [
"google-resumable-media~=2.7.1",
"googleapis-common-protos~=1.63.0",
"greenlet~=2.0.1",
"grpcio~=1.60.0",
"grpcio-status~=1.60.0",
"grpcio~=1.60",
"grpcio-status~=1.60",
"gunicorn~=20.1.0",
"gviz-api~=1.10.0",
"gymnasium~=0.28.1",
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/15.4.x-gpu-ml-scala2.12/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ google-pasta~=0.2.0
google-resumable-media~=2.7.1
googleapis-common-protos~=1.63.0
greenlet~=2.0.1
grpcio~=1.60.0
grpcio-status~=1.60.0
grpcio~=1.60
grpcio-status~=1.60
gunicorn~=20.1.0
gviz-api~=1.10.0
gymnasium~=0.28.1
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/15.4.x-gpu-ml-scala2.12/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ constraint-dependencies = [
"google-resumable-media~=2.7.1",
"googleapis-common-protos~=1.63.0",
"greenlet~=2.0.1",
"grpcio~=1.60.0",
"grpcio-status~=1.60.0",
"grpcio~=1.60",
"grpcio-status~=1.60",
"gunicorn~=20.1.0",
"gviz-api~=1.10.0",
"gymnasium~=0.28.1",
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/15.4.x-scala2.12/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ google-cloud-storage~=2.17.0
google-crc32c~=1.5.0
google-resumable-media~=2.7.1
googleapis-common-protos~=1.63.2
grpcio~=1.60.0
grpcio-status~=1.60.0
grpcio~=1.60
grpcio-status~=1.60
httplib2~=0.20.2
idna~=3.4
importlib-metadata~=6.0.0
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/15.4.x-scala2.12/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ constraint-dependencies = [
"google-crc32c~=1.5.0",
"google-resumable-media~=2.7.1",
"googleapis-common-protos~=1.63.2",
"grpcio~=1.60.0",
"grpcio-status~=1.60.0",
"grpcio~=1.60",
"grpcio-status~=1.60",
"httplib2~=0.20.2",
"idna~=3.4",
"importlib-metadata~=6.0.0",
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/16.4.x-cpu-ml-scala2.12/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ googleapis-common-protos~=1.70.0
gql~=3.5.2
graphql-core~=3.2.4
greenlet~=3.0.1
grpcio~=1.60.0
grpcio-status~=1.60.0
grpcio~=1.60
grpcio-status~=1.60
gunicorn~=20.1.0
gviz-api~=1.10.0
gymnasium~=0.28.1
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/16.4.x-cpu-ml-scala2.12/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ constraint-dependencies = [
"gql~=3.5.2",
"graphql-core~=3.2.4",
"greenlet~=3.0.1",
"grpcio~=1.60.0",
"grpcio-status~=1.60.0",
"grpcio~=1.60",
"grpcio-status~=1.60",
"gunicorn~=20.1.0",
"gviz-api~=1.10.0",
"gymnasium~=0.28.1",
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/16.4.x-gpu-ml-scala2.12/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ googleapis-common-protos~=1.70.0
gql~=3.5.2
graphql-core~=3.2.4
greenlet~=3.0.1
grpcio~=1.60.0
grpcio-status~=1.60.0
grpcio~=1.60
grpcio-status~=1.60
gunicorn~=20.1.0
gviz-api~=1.10.0
gymnasium~=0.28.1
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/16.4.x-gpu-ml-scala2.12/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ constraint-dependencies = [
"gql~=3.5.2",
"graphql-core~=3.2.4",
"greenlet~=3.0.1",
"grpcio~=1.60.0",
"grpcio-status~=1.60.0",
"grpcio~=1.60",
"grpcio-status~=1.60",
"gunicorn~=20.1.0",
"gviz-api~=1.10.0",
"gymnasium~=0.28.1",
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/16.4.x-scala2.12/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ google-cloud-storage~=2.18.2
google-crc32c~=1.6.0
google-resumable-media~=2.7.2
googleapis-common-protos~=1.65.0
grpcio~=1.60.0
grpcio-status~=1.60.0
grpcio~=1.60
grpcio-status~=1.60
httplib2~=0.20.4
idna~=3.7
importlib-metadata~=6.0.0
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/16.4.x-scala2.12/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ constraint-dependencies = [
"google-crc32c~=1.6.0",
"google-resumable-media~=2.7.2",
"googleapis-common-protos~=1.65.0",
"grpcio~=1.60.0",
"grpcio-status~=1.60.0",
"grpcio~=1.60",
"grpcio-status~=1.60",
"httplib2~=0.20.4",
"idna~=3.7",
"importlib-metadata~=6.0.0",
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/17.3.x-cpu-ml-scala2.13/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ googleapis-common-protos~=1.65.0
gql~=4.0.0
graphql-core~=3.2.4
greenlet~=3.1.1
grpcio~=1.67.0
grpcio-status~=1.67.0
grpcio~=1.67
grpcio-status~=1.67
gunicorn~=20.1.0
gymnasium~=0.28.1
h11~=0.14.0
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/17.3.x-cpu-ml-scala2.13/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ constraint-dependencies = [
"gql~=4.0.0",
"graphql-core~=3.2.4",
"greenlet~=3.1.1",
"grpcio~=1.67.0",
"grpcio-status~=1.67.0",
"grpcio~=1.67",
"grpcio-status~=1.67",
"gunicorn~=20.1.0",
"gymnasium~=0.28.1",
"h11~=0.14.0",
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/17.3.x-gpu-ml-scala2.13/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ googleapis-common-protos~=1.65.0
gql~=4.0.0
graphql-core~=3.2.4
greenlet~=3.1.1
grpcio~=1.67.0
grpcio-status~=1.67.0
grpcio~=1.67
grpcio-status~=1.67
gunicorn~=20.1.0
gymnasium~=0.28.1
h11~=0.14.0
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/17.3.x-gpu-ml-scala2.13/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ constraint-dependencies = [
"gql~=4.0.0",
"graphql-core~=3.2.4",
"greenlet~=3.1.1",
"grpcio~=1.67.0",
"grpcio-status~=1.67.0",
"grpcio~=1.67",
"grpcio-status~=1.67",
"gunicorn~=20.1.0",
"gymnasium~=0.28.1",
"h11~=0.14.0",
Expand Down
4 changes: 2 additions & 2 deletions python/dbr/17.3.x-scala2.13/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ google-cloud-storage~=3.1.0
google-crc32c~=1.7.1
google-resumable-media~=2.7.2
googleapis-common-protos~=1.65.0
grpcio~=1.67.0
grpcio-status~=1.67.0
grpcio~=1.67
grpcio-status~=1.67
h11~=0.14.0
httpcore~=1.0.2
httplib2~=0.20.4
Expand Down
Loading