Repository navigation
fix(migrations): merge the two alembic heads on master - #44317
mikebridge wants to merge 2 commits into
Conversation
`88a01c781622` (functional index on `ab_user(lower(username))`, apache#43939) and `c7f53d184ea2` (purge-audit pruning coordination, apache#43490) landed as siblings rather than in a chain, leaving the revision graph with two heads. Every `superset db upgrade` against master fails: ERROR [flask_migrate] Error: Multiple head revisions are present for given argument 'head'; please specify a specific target revision, '<branchname>@Head' to narrow to a specific head, or 'heads' for all heads Neither migration depends on the other, so this is an empty merge that only rejoins the graph — no schema change, and nothing to undo. Verified from an empty PostgreSQL database: `superset db upgrade` fails with the error above without this revision and completes cleanly with it, leaving a single `alembic_version` of `e2f0a912492a`. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01267VBWbvWTNZUg9GvXKgkC
Code Review Agent Run #cd14beActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #44317 +/- ##
==========================================
+ Coverage 75.91% 80.23% +4.32%
==========================================
Files 2926 2926
Lines 173041 173041
Branches 40145 40145
==========================================
+ Hits 131359 138842 +7483
+ Misses 39003 31607 -7396
+ Partials 2679 2592 -87
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Coordinating baseline repair for #44284: its 15 failing checks (integration, browser, CLI examples, dev image, and dependent required gates) are blocked by these same two Alembic heads. #44288 is an earlier no-op merge of the identical parents, and #44283 also joins them in its data migration. Please land only one merge revision and rebase/reparent the others, or the two-head failure will return. I will rebase #44284 onto the selected repair after it lands and rerun its CI; I will not merge these PRs. @mikebridge @richardfogaca |
|
Closing in favour of @aminghadersohi 's #44288 |
SUMMARY
superset db upgradecurrently fails on master. Two migrations landed as siblings rather than in a chain, so the revision graph has two heads:88a01c781622index_ab_user_lower_usernamec7f53d184ea2coordinate_purge_audit_pruningBoth are childless — nothing declares either as its
down_revision— so alembic cannot resolvehead:This blocks anyone running migrations on master, including a fresh install and CI jobs that upgrade a database.
Neither migration depends on the other (one adds a functional index on
ab_user, the other coordinates purge-audit pruning), so this is an empty merge:upgrade()anddowngrade()are bothpass, and the revision exists only to rejoin the graph. One file, no schema change.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Verified against a fresh, empty PostgreSQL database, both directions:
TESTING INSTRUCTIONS
Or inspect the graph directly —
alembic headsshould report exactly one revision. Note that a naive regex over the migration files gives the wrong answer here: several existing merge migrations declaredown_revisionas a multi-line tuple, so a parser that only handles the single-string form reports dozens of spurious heads. An AST walk over all 388 revisions returns exactly one with this change, and exactly the two above without it.ADDITIONAL INFORMATION
Migration notes: the revision is empty in both directions, so upgrade and downgrade are instantaneous, require no locks, and need no downtime. No
UPDATING.mdentry — there is no behavioural change to describe.🤖 Generated with Claude Code
https://claude.ai/code/session_01267VBWbvWTNZUg9GvXKgkC