From 3eb33e761c2464472381d7fc53f5846d67653da9 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Tue, 14 Jul 2026 14:22:15 +0200 Subject: [PATCH] [v3-3-test] Pin databricks-sql-connector>=4.0.0 in generated constraints (#69863) thrift 0.24.0 (apache/thrift#3584) is incompatible with the databricks-sql-connector thrift<=0.23.0 requirement, so during highest resolution the resolver preferred the newest thrift and downgraded the connector, which in turn dragged the databricks provider back to an old version. Pinning the connector to >=4.0.0 keeps PyPI constraints installable with a current databricks-sql-connector and provider. (cherry picked from commit 98b4b01394c6624d02b53e87d47f6c26fc74dc2f) Co-authored-by: Jarek Potiuk closes: #69603 --- scripts/in_container/run_generate_constraints.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/in_container/run_generate_constraints.py b/scripts/in_container/run_generate_constraints.py index 3b3a839d1e5e5..8ead3a6703dd7 100755 --- a/scripts/in_container/run_generate_constraints.py +++ b/scripts/in_container/run_generate_constraints.py @@ -398,10 +398,15 @@ def generate_constraints_pypi_providers(config_params: ConfigParams) -> None: # does not yet carry this cap, so we mirror it here so PyPI constraints stay installable # until the SQLAlchemy fix is released. Tracked upstream at # https://github.com/sqlalchemy/sqlalchemy/issues/13306 - # + # * databricks-sql-connector>=4.0.0 - added to keep databricks-sql-connector from downgrading + # because of https://github.com/apache/thrift/pull/3584 - which shipped thrift 0.24.0. Older + # versions of databricks-sql-connector do not have the thrift<=0.23.0 limitation, so the + # resolver preferred the latest thrift over the latest connector and downgraded the connector. + # This is tracked in https://github.com/databricks/databricks-sql-python/issues/859 additional_constraints_for_highest_resolution: list[str] = [ "pyarrow>=22.0.0; python_version >= '3.14'", "pymysql>=1.0.3,<1.2", + "databricks-sql-connector>=4.0.0", ] result = run_command(