diff --git a/scripts/gates/testsupport/cell_trigger/fixture.py b/scripts/gates/testsupport/cell_trigger/fixture.py index 2676a40439d..3854ee957e4 100644 --- a/scripts/gates/testsupport/cell_trigger/fixture.py +++ b/scripts/gates/testsupport/cell_trigger/fixture.py @@ -88,7 +88,7 @@ "lib/python3.12/site-packages/asyncpg/protocol/protocol.cpython-312-aarch64-linux-gnu.so", "lib/python3.12/site-packages/asyncpg/protocol/record.cpython-312-aarch64-linux-gnu.so", ) -CODEC_VERSIONS = {"clickhouse-connect": "1.9.0", "asyncpg": "0.32.0"} +CODEC_VERSIONS = {"clickhouse-connect": "1.13.0", "asyncpg": "0.32.0"} class Refused(RuntimeError): diff --git a/tests/unit/test_cell_trigger_ci_creator.py b/tests/unit/test_cell_trigger_ci_creator.py index cf560d78603..74baabf89a7 100644 --- a/tests/unit/test_cell_trigger_ci_creator.py +++ b/tests/unit/test_cell_trigger_ci_creator.py @@ -125,8 +125,11 @@ def test_dependency_metadata_accepts_only_the_actual_python_version(tmp_path): path = environment / name path.parent.mkdir(parents=True, exist_ok=True) path.write_text("fixture codec bytes") - (environment / fixture.CODEC_FILES[1]).write_text('version = "1.9.0"\n') - (environment / fixture.CODEC_FILES[4]).write_text('__version__ = "0.32.0"\n') + versions = fixture.CODEC_VERSIONS + (environment / fixture.CODEC_FILES[1]).write_text( + f'version = "{versions["clickhouse-connect"]}"\n' + ) + (environment / fixture.CODEC_FILES[4]).write_text(f'__version__ = "{versions["asyncpg"]}"\n') spec = { "root": str(tmp_path), "python": str(environment / "bin/python"), @@ -1385,3 +1388,14 @@ def write(path, *args, **kwargs): assert diagnostic == ( {"schema": 1, "rows": rows} if mode == "valid" else {"schema": 1, "invalid": 1} ) + + +def test_the_codec_pins_match_the_lockfile(): + """A lock bump of a pinned codec fails here, in its own PR, not in the nightly run.""" + import tomllib + + from scripts.gates.testsupport.cell_trigger import fixture + + lock = tomllib.loads((Path(__file__).parents[2] / "uv.lock").read_text()) + locked = {p["name"]: p["version"] for p in lock["package"]} + assert {name: locked[name] for name in fixture.CODEC_VERSIONS} == fixture.CODEC_VERSIONS