fix(seed): add placeholder tables/columns drifted from gold-view migr… - #1451
Conversation
…ations The dev-compose seed (`compose/seed/silver.py`) applies `sql/placeholders.sql` then the gold-view migrations in `src/ingestion/scripts/migrations/`. Three newer migrations referenced silver objects the placeholder script never mirrored, so `seed silver` (and the first-run `dev-compose.sh up` auto-seed) crashed: - `g.code_loc` on silver.mtr_git_person_weekly → UNKNOWN_IDENTIFIER (20260605000001_ic-kpis-git-fanout-fix) - silver.class_ai_overage → UNKNOWN_TABLE (20260618000000_ai-claude-team-overage-gold) - silver.class_wiki_pages / silver.class_wiki_engagement → UNKNOWN_TABLE (20260620000000_wiki-bullet-rows) Add the missing column and tables, tracking the subset of columns the consuming migrations read (the real silver models carry the full contracts). The wiki classes key on `tenant_id` (not `insight_tenant_id`) to match the view's engagement→pages join. Verified: `dev-compose.sh seed all` completes (27 migrations, 204 statements, 28,181 rows) and analytics-api re-validates 95/95 metrics OK (previously erroring on table_not_found). Unblocks the constructorfabric#1419 smoke test. Part of constructorfabric#1414 Signed-off-by: Anton Zelenov <antonz@constructor.tech>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe seed SQL script adds three new ChangesSilver Placeholder Schema Additions
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ations
The dev-compose seed (
compose/seed/silver.py) appliessql/placeholders.sqlthen the gold-view migrations insrc/ingestion/scripts/migrations/. Three newer migrations referenced silver objects the placeholder script never mirrored, soseed silver(and the first-rundev-compose.sh upauto-seed) crashed:g.code_locon silver.mtr_git_person_weekly → UNKNOWN_IDENTIFIER (20260605000001_ic-kpis-git-fanout-fix)Add the missing column and tables, tracking the subset of columns the consuming migrations read (the real silver models carry the full contracts). The wiki classes key on
tenant_id(notinsight_tenant_id) to match the view's engagement→pages join.Verified:
dev-compose.sh seed allcompletes (27 migrations, 204 statements, 28,181 rows) and analytics-api re-validates 95/95 metrics OK (previously erroring on table_not_found). Unblocks the #1419 smoke test.Part of #1414
Summary by CodeRabbit