backend status blocked by DB migration gate — fails Firecracker CI preflight #419

Closed
opened 2026-07-18 15:27:07 -04:00 by didericis-claude · 0 comments
Collaborator

Summary

The Firecracker integration CI job fails at its Preflight — Firecracker host is ready step. The step runs:

python3 cli.py backend status --backend=firecracker

but the command exits non-zero before ever probing the host, printing:

bot-bottle: database schema is out of date
Migrate now? [y/N] bot-bottle: error: migration required — re-run and confirm to migrate

Root cause

Every command flows through the dispatcher in bot_bottle/cli/__init__.py, which runs a DB schema-migration gate before dispatch: if StoreManager.is_migrated() is false it prints database schema is out of date and interactively prompts Migrate now? [y/N].

On the self-hosted KVM / act runner stdin is not a TTY, so the prompt reads EOF (""), treats it as "no", and exits 1.

The deeper problem: backend status only probes host prerequisites (firecracker on PATH, /dev/kvm, the TAP/nft pool). It never opens the store, so gating it on the application DB schema is wrong regardless of CI — a fresh runner has no migrated DB but is perfectly capable of reporting host readiness.

Fix

Exempt the backend command (setup/status/teardown — all store-free host-prerequisite management) from the migration gate in the CLI dispatcher. Store-touching commands (start, list, resume, …) remain gated as before.

Impact

  • Blocks the integration-firecracker and coverage CI jobs at preflight on a runner without a pre-migrated DB.
  • No runtime data risk — the gate is protective, and the exempted command does not touch the store.
## Summary The Firecracker integration CI job fails at its **`Preflight — Firecracker host is ready`** step. The step runs: ``` python3 cli.py backend status --backend=firecracker ``` but the command exits non-zero before ever probing the host, printing: ``` bot-bottle: database schema is out of date Migrate now? [y/N] bot-bottle: error: migration required — re-run and confirm to migrate ``` ## Root cause Every command flows through the dispatcher in `bot_bottle/cli/__init__.py`, which runs a DB **schema-migration gate** before dispatch: if `StoreManager.is_migrated()` is false it prints `database schema is out of date` and interactively prompts `Migrate now? [y/N]`. On the self-hosted KVM / act runner stdin is not a TTY, so the prompt reads EOF (`""`), treats it as "no", and exits `1`. The deeper problem: `backend status` only probes **host prerequisites** (firecracker on PATH, `/dev/kvm`, the TAP/nft pool). It never opens the store, so gating it on the application DB schema is wrong regardless of CI — a fresh runner has no migrated DB but is perfectly capable of reporting host readiness. ## Fix Exempt the `backend` command (setup/status/teardown — all store-free host-prerequisite management) from the migration gate in the CLI dispatcher. Store-touching commands (`start`, `list`, `resume`, …) remain gated as before. ## Impact - Blocks the `integration-firecracker` and `coverage` CI jobs at preflight on a runner without a pre-migrated DB. - No runtime data risk — the gate is protective, and the exempted command does not touch the store.
didericis-claude added the Kind/Bug label 2026-07-18 15:27:07 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: didericis/bot-bottle#419