fix(cli): exempt backend command from DB migration gate #420
Reference in New Issue
Block a user
Delete Branch "fix-backend-status-migration-gate"
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?
Problem
The Firecracker integration CI job fails at its
Preflight — Firecracker host is readystep, which runspython3 cli.py backend status --backend=firecracker. On the self-hosted KVM / act runner stdin isn't a TTY, so the dispatcher's DB migration gate prompt (Migrate now? [y/N]) reads EOF and the command exits 1 before probing the host:Fix
backend setup/status/teardownmanage host prerequisites (firecracker//dev/kvm/TAP pool) and never open the store, so gating them on the application DB schema is wrong regardless of CI. This exemptsbackendfrom the migration gate inbot_bottle/cli/__init__.py. Store-touching commands (start,list,resume, …) stay gated exactly as before.Tests
Added a
TestMigrationGateclass intests/unit/test_cli_dispatch.py:backenddispatches even on an unmigrated DB with EOF stdin,Reproduced the original failure and the fix locally; full CLI suite green.
Fixes #419
🤖 Generated with Claude Code
https://claude.ai/code/session_01S1qRZTJC6qgBsUSjNrBdkX