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
2 changes: 1 addition & 1 deletion scripts/gates/testsupport/cell_trigger/fixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
18 changes: 16 additions & 2 deletions tests/unit/test_cell_trigger_ci_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -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
Loading