fixes plan cache issue with migration - #4819
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe ChangesMigration hash refresh fix
Estimated code review effort: 2 (Simple) | ~12 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies" Comment |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
97e913b to
6fb48ee
Compare
|
|
6fb48ee to
21b82ab
Compare
Merge activity
|

Summary
Fixes a regression (#4797) where the config-hash recompute migration failed on upgrade from a pre-1.6 schema. The
TableClientConfigstruct declaresdump_errors_in_console_logs, but on older schemas this column does not yet exist on the physical table when the recompute step runs. The previous implementation derived itsSELECTprojection solely from the struct, causing PostgreSQL to return error42703(undefined column) and SQLite to return "no such column".Changes
migrationRefreshConfigHashAfterMCPExternalServerURLRemovalnow intersects the struct's declared column names with the columns that physically exist on the live table before building theSELECTprojection. This prevents naming absent columns regardless of future struct additions.AfterFindhook path is preserved by keeping.Findrather than switching to a rawScan, ensuring*_jsoncolumns are still deserialized correctly for hash computation.TestMigrationRefreshConfigHash_ColumnAheadOfTable: focused test that dropsdump_errors_in_console_logsfrom the table and confirms the recompute step succeeds and produces a fresh hash.TestFullMigration_UpgradeFromPreDumpErrorsSchema: end-to-end test that runs the full migration chain against a column-less table, confirming the column is re-added and the hash is recomputed.git fetch --tagsin the migration test CI script is commented out to avoid tag-fetch side effects during test runs.Type of change
Affected areas
How to test
Both tests should pass. Prior to this fix, both would fail with a "no such column: dump_errors_in_console_logs" (SQLite) or
42703(PostgreSQL) error.Breaking changes
Related issues
Closes #4797
Security considerations
None. This change only affects the column projection used during a read inside a migration transaction.
Checklist
docs/contributing/README.mdand followed the guidelines