fix: remove stale Board import from alembic/env.py #262
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/pal-e-api!262
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "261-fix-remove-stale-board-import-from-alemb"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Remove the stale
Boardimport fromalembic/env.pythat causesImportErroron every CI run since the Board model was removed fromsrc/pal_e_docs/models.py.Changes
alembic/env.py: RemovedBoardfrom the import block (1 line deletion)Test Plan
ruff check .andruff format --check .passpython -c "from pal_e_docs.models import Block, BoardItem, CompiledPage, Note, NoteLink, NoteRevision, NoteTag, Project, Repo, Tag, User"succeedsReview Checklist
Related Notes
None.
Related
Closes #261
PR #262 Review
DOMAIN REVIEW
Tech stack: Python / FastAPI / SQLAlchemy / Alembic (pal-e-api backend).
Critical factual error in the PR premise. The PR summary and issue #261 claim that
Boardwas removed frommodels.pyand that importing it causes anImportError. This is incorrect.Boardis fully defined insrc/pal_e_docs/models.pyat line 253:It is actively referenced by:
BoardItem.boardrelationship (models.py line 304)src/pal_e_docs/routes/boards.py(imports and queriesBoardthroughout)scripts/migrate_boards_to_notes.pytests/conftest.py(importsBoard)Removing
Boardfrom thealembic/env.pyimport block would cause Alembic autogenerate to no longer see theboardstable metadata. The nextalembic revision --autogeneratewould produce a migration that drops theboardstable, which is a data-destructive outcome.BLOCKERS
Boardclass is present inmodels.pyand actively used across the codebase (routes, tests, relationships). Removing its import fromalembic/env.pyis incorrect and risks generating destructive Alembic migrations. This change must not be merged.NITS
None -- the single-line change is itself the problem.
SOP COMPLIANCE
261-fix-remove-stale-board-import-from-alemb)PROCESS OBSERVATIONS
The issue and PR were created based on an incorrect assumption that
Boardhad been removed frommodels.py. Before creating fix PRs for import errors, the actual state of the codebase should be verified. If CI is truly failing with anImportErroronBoard, the root cause is elsewhere (e.g., a deployment or environment issue), not a stale import.Recommendation: Close this PR and issue #261. If there is a genuine CI failure, investigate the actual root cause rather than removing a valid import.
VERDICT: NOT APPROVED