Repository navigation
fix(migrations): break Alembic duplicate-revision 172 head (renumber soft-delete to 173) - #581
Merged
Merged
Conversation
…te-revision 172 head Both 172_repair_deepseek_default_self_hosted.py and 172_soft_delete_conversations.py declared revision '172' with down_revision '171', leaving two Alembic heads. 'alembic upgrade head' fails with 'Multiple head revisions are present', which breaks the test DB template build and any fresh migration run. Renumber the newer soft-delete migration to 173 and chain it after 172 (the deepseek repair), restoring a single linear head. Also corrects the migration's stale docstring header (Revision ID/Revises). Co-authored-by: openhands <openhands@all-hands.dev>
Contributor
|
|
aivong-openhands
marked this pull request as ready for review
September 30, 2026 03:37
aivong-openhands
enabled auto-merge (squash)
September 30, 2026 03:37
Contributor
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
1 of 6 tasks
Contributor
|
🚀 Released in 1.68.0. |
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.
Why
maincurrently has two Alembic migrations claiming the same revision172:172_repair_deepseek_default_self_hosted.py—revision = '172',down_revision = '171'(renumbered to 172 in fix(migrations): renumber deepseek repair to 172 to unbreak alembic on main #555)172_soft_delete_conversations.py—revision = '172',down_revision = '171'(added in fix(conversations): soft-delete conversations instead of hard-deleting #173)Both point at
171and neither is a child of the other, so the history has two heads.alembic upgrade headfails with:This breaks the Postgres test-DB template build (
alembic upgrade headatINTERNALERRORbefore any test runs) and would break a real migration run on deploy. #555 fixed exactly this class of collision on 09-28; the soft-delete migration merged on 09-29 reintroduced it.What
173and chain it after172(the deepseek repair):revision = '173',down_revision = '172'. File renamed172_… → 173_soft_delete_conversations.py.Revision ID: 171 / Revises: 170.The two migrations are independent (soft-delete adds a
deleted_atcolumn + partial index; the deepseek migration is a settings/data repair), so ordering them172 → 173is behaviour-preserving.How tested
alembic upgrade headnow resolves to a single linear head (170 → 171 → 172 → 173); no duplicate revision ids remain.alembic upgrade head) now succeeds, andtests/unit/app_server/test_webhook_router_stats.py::TestProcessStatsEventpasses — previously it aborted withINTERNALERROR ... Multiple head revisions are present.ruff format --check/ruff checkclean on the renamed file.Note for reviewers
Open PR #453 adds
173_unset_empty_agent_profile_tools.pywithdown_revision = '172'. Once this lands, #453 will collide on173and should be rebased todown_revision = '173'/ revision174.Type
This PR was created by an AI agent (OpenHands) on behalf of @aivong-openhands.
Enterprise server image for this PR: