feat(BA-7343): backfill missing idle_checkers.target_session_types - #13726
Open
seedspirit wants to merge 3 commits into
Open
feat(BA-7343): backfill missing idle_checkers.target_session_types#13726seedspirit wants to merge 3 commits into
seedspirit wants to merge 3 commits into
Conversation
26.7.0 released migration d3f8a1c45e9b without target_session_types; the column was later added by editing that migration in place (#12398), so databases migrated on 26.7.x never received it and 26.8.x fails the idle_check_judgment lifecycle with UndefinedColumnError. Add an idempotent repair migration (f2d658cac56b) inserted right after b93d1c47af52 so the same revision id can back onto 26.8, plus a duplicate (8dc37d4bbf38) on the main head for databases tracking main. Pre-existing rows are backfilled with an empty array so checkers created before the column existed stay inert until an admin assigns target types. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an idempotent Alembic repair for missing idle_checkers.target_session_types columns across release and main migration chains.
Changes:
- Backfills missing columns with an empty array.
- Adds a main-branch duplicate migration for already-upgraded databases.
- Reparents the next migration to preserve a linear chain.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
f2d658cac56b_ensure_idle_checkers_target_session_types.py |
Adds the backportable repair migration. |
8dc37d4bbf38_ensure_idle_checkers_target_session_types_dup.py |
Repairs databases already tracking main. |
857c4d02c4b9_rekey_domain_rbac_rows_to_domain_uuid.py |
Inserts the repair into the migration chain. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This was referenced Aug 12, 2026
The mid-chain insertion existed only so 26.8 could share the same revision id; with the 26.8 backport replaced by stage unregistration (BA-7344, #13734), a single idempotent migration at the main head covers every upgrade path, including 26.7.x databases moving through 26.8. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Member
|
CI is failing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
d3f8a1c45e9bwithouttarget_session_types; feat(BA-6581): wire IdleCheckerRepository into idle-check reconciler source #12398 later added the column by editing that migration in place, so databases migrated in that window never received it and the idle-check queries fail withUndefinedColumnError.f2d658cac56b) at the chain head:ADD COLUMN IF NOT EXISTS ... NOT NULL DEFAULT '{}'followed byDROP DEFAULT, so it is a no-op on databases that already have the column.26.8 does not take a schema repair; it unregisters the idle-check reconciler stages instead (#13734, BA-7344). A 26.7.x database upgrading through 26.8 to a main-based release is still covered — this migration sits on the main chain it will pass through.
Test plan
c8d51e7a3b62→upgrade headrestores the column, backfills{}, NOT NULL without default (matches the model)downgrade -1→upgrade headround tripf2d658cac56b)Resolves BA-7343
🤖 Generated with Claude Code