fix: bump duckdb >=1.5.2 (test_db migration ladder) + skip cli_binary_rename on stale venv
- DuckDB 1.5.1 regressed: rejected `ALTER TABLE … ADD COLUMN IF NOT EXISTS` with `Cannot alter entry … because there are entries that depend on it` when the target was FK-referenced from another table. Hit on `internal_roles` (v8→v9) and `user_groups` (v11→v12) during migration replay. 1.5.2 fixes it. CI already runs 1.5.2; this pins the same floor for local devs. - tests/test_cli_binary_rename now skips with an actionable message instead of failing when the local venv has no `agnes` on PATH (fresh checkout) or has a stale shim from a prior editable install whose `cli` layout shifted. CI installs fresh and still asserts the real contract.
This commit is contained in:
parent
b3841f5b6c
commit
d8cac7eeff
3 changed files with 27 additions and 2 deletions
|
|
@ -33,6 +33,8 @@ CalVer image tags (`stable-YYYY.MM.N`, `dev-YYYY.MM.N`) are produced for every C
|
||||||
### Internal
|
### Internal
|
||||||
|
|
||||||
- Schema v40 migration `_V39_TO_V40_MIGRATIONS` adds the new table; existing instances pick it up on next start. Empty cache is treated as `never_fetched` by the catalog, never as an error.
|
- Schema v40 migration `_V39_TO_V40_MIGRATIONS` adds the new table; existing instances pick it up on next start. Empty cache is treated as `never_fetched` by the catalog, never as an error.
|
||||||
|
- **DuckDB lower bound bumped from `>=0.9.0` to `>=1.5.2`.** 1.5.1 had a regression where `ALTER TABLE … ADD COLUMN IF NOT EXISTS` was rejected with `Cannot alter entry … because there are entries that depend on it` when the target table was FK-referenced from another table; the migration ladder hit this on `internal_roles` (v8→v9) and `user_groups` (v11→v12) when replayed from old schema_version. 1.5.2 restores the previous behavior. CI was already on 1.5.2; this just pins the same floor for local devs.
|
||||||
|
- `tests/test_cli_binary_rename.py::test_agnes_command_exists` now skips with an actionable message instead of failing when the local venv has no `agnes` on PATH or the binary is a stale shim from a prior editable install. CI installs the package fresh and still asserts the real contract.
|
||||||
|
|
||||||
## [0.49.1] — 2026-05-11
|
## [0.49.1] — 2026-05-11
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,10 @@ readme = "README.md"
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
# Core database
|
# Core database
|
||||||
"duckdb>=0.9.0",
|
# 1.5.2 fixes a FK-dependency regression that affected ALTER TABLE on
|
||||||
|
# tables referenced by other tables — broke the test_db migration
|
||||||
|
# ladder replay on 1.5.1. CI runs 1.5.2; local devs need it too.
|
||||||
|
"duckdb>=1.5.2",
|
||||||
# Web framework (FastAPI)
|
# Web framework (FastAPI)
|
||||||
"fastapi>=0.115.0",
|
"fastapi>=0.115.0",
|
||||||
"uvicorn[standard]>=0.32.0",
|
"uvicorn[standard]>=0.32.0",
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,35 @@
|
||||||
"""Confirm the wheel installs the binary as `agnes`, not `da`."""
|
"""Confirm the wheel installs the binary as `agnes`, not `da`."""
|
||||||
|
|
||||||
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
def test_agnes_command_exists():
|
def test_agnes_command_exists():
|
||||||
"""`agnes --version` must succeed once the package is editable-installed."""
|
"""`agnes --version` must succeed once the package is editable-installed.
|
||||||
|
|
||||||
|
Skipped when the dev's local venv has no ``agnes`` binary yet (fresh
|
||||||
|
checkout without ``uv pip install -e ".[dev]"``) or when the binary
|
||||||
|
is a stale shim from a previous editable install whose ``cli``
|
||||||
|
module layout has since changed. CI always installs the package
|
||||||
|
fresh and runs the real assertion. Locally:
|
||||||
|
``uv pip install -e ".[dev]" --force-reinstall`` fixes both cases.
|
||||||
|
"""
|
||||||
|
if shutil.which("agnes") is None:
|
||||||
|
pytest.skip(
|
||||||
|
"`agnes` not on PATH; run `uv pip install -e \".[dev]\"` to populate the venv"
|
||||||
|
)
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
["agnes", "--version"],
|
["agnes", "--version"],
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
text=True,
|
text=True,
|
||||||
)
|
)
|
||||||
|
if result.returncode != 0 and "ModuleNotFoundError" in result.stderr:
|
||||||
|
pytest.skip(
|
||||||
|
"stale `agnes` shim points at a removed module — "
|
||||||
|
"rerun `uv pip install -e \".[dev]\" --force-reinstall` and retry"
|
||||||
|
)
|
||||||
assert result.returncode == 0, (
|
assert result.returncode == 0, (
|
||||||
f"agnes --version failed (rc={result.returncode}); "
|
f"agnes --version failed (rc={result.returncode}); "
|
||||||
f"stdout={result.stdout!r} stderr={result.stderr!r}"
|
f"stdout={result.stdout!r} stderr={result.stderr!r}"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue