fix: add mcp_enable_temp_token_auth dynamic column and replace cut with awk for column-order-safe snapshot comparison - #3889
Conversation
|
Warning Review limit reached
More reviews will be available in 9 minutes and 59 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Confidence Score: 5/5Changes are isolated to CI/migration test infrastructure and carry no production risk. Both changes are straightforward: the No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "fix: migration test fixes" | Re-trigger Greptile |
Merge activity
|
2946c13 to
04310b2
Compare
|
|
…` with `awk` for column-order-safe snapshot comparison (maximhq#3889) ## Summary Adds migration test support for the new `mcp_enable_temp_token_auth` config column and fixes a column-ordering bug in the Postgres snapshot comparison logic that caused false failures when columns were dropped and re-added via `ALTER TABLE ADD COLUMN`. ## Changes - Added `mcp_enable_temp_token_auth` to the dynamic column append logic for both Postgres and SQLite migration tests, setting it to `false`/`0` when the column exists. - Replaced `cut -f` with `awk` in `compare_postgres_snapshots` for extracting columns during before/after snapshot comparison. `cut` always emits fields in ascending positional order regardless of the column spec, which causes row misalignment when a column's physical position in the after-schema differs from its logical position (e.g. a column dropped and re-added ends up at the end of the table). `awk` respects the specified field order, producing correct alignment. ## Type of change - [x] Bug fix - [x] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs ## How to test Run the migration test suite and verify that snapshot comparisons pass correctly, including for tables where columns have been dropped and re-added. ## Breaking changes - [x] No ## Security considerations None. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
…` with `awk` for column-order-safe snapshot comparison (maximhq#3889) ## Summary Adds migration test support for the new `mcp_enable_temp_token_auth` config column and fixes a column-ordering bug in the Postgres snapshot comparison logic that caused false failures when columns were dropped and re-added via `ALTER TABLE ADD COLUMN`. ## Changes - Added `mcp_enable_temp_token_auth` to the dynamic column append logic for both Postgres and SQLite migration tests, setting it to `false`/`0` when the column exists. - Replaced `cut -f` with `awk` in `compare_postgres_snapshots` for extracting columns during before/after snapshot comparison. `cut` always emits fields in ascending positional order regardless of the column spec, which causes row misalignment when a column's physical position in the after-schema differs from its logical position (e.g. a column dropped and re-added ends up at the end of the table). `awk` respects the specified field order, producing correct alignment. ## Type of change - [x] Bug fix - [x] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs ## How to test Run the migration test suite and verify that snapshot comparisons pass correctly, including for tables where columns have been dropped and re-added. ## Breaking changes - [x] No ## Security considerations None. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable

Summary
Adds migration test support for the new
mcp_enable_temp_token_authconfig column and fixes a column-ordering bug in the Postgres snapshot comparison logic that caused false failures when columns were dropped and re-added viaALTER TABLE ADD COLUMN.Changes
mcp_enable_temp_token_authto the dynamic column append logic for both Postgres and SQLite migration tests, setting it tofalse/0when the column exists.cut -fwithawkincompare_postgres_snapshotsfor extracting columns during before/after snapshot comparison.cutalways emits fields in ascending positional order regardless of the column spec, which causes row misalignment when a column's physical position in the after-schema differs from its logical position (e.g. a column dropped and re-added ends up at the end of the table).awkrespects the specified field order, producing correct alignment.Type of change
Affected areas
How to test
Run the migration test suite and verify that snapshot comparisons pass correctly, including for tables where columns have been dropped and re-added.
Breaking changes
Security considerations
None.
Checklist
docs/contributing/README.mdand followed the guidelines