Repository navigation
fix: make model metadata merging deterministic - #7874
harsh21234i wants to merge 3 commits into
Conversation
[Medium impact] The follow-up change appears safe to merge. SummaryThe PR makes database table merging predictable and rejects conflicting table definitions.
The earlier test concern is addressed: the ordering test now calls Reviews (3) · Last reviewed commit: "perf: avoid scanning model registry on r..." · Reviewed by Greptile |
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
Merging this PR will not alter performance1 warning
Comparing Footnotes
|
Fixes #7830 by preserving model registration order when combining metadata from multiple model bases. If separate metadata objects define the same table, the registry now raises a clear
InvalidRequestErrorinstead of silently selecting one definition.Regression coverage verifies deterministic ordering through
register(), ordering after a model is removed and re-registered, duplicate table detection, and preservation of convention-generated constraint names.Testing:
uv run pytest tests/units/test_model.py tests/units/utils/test_migrations.py -q— 60 passed.