Skip to content

fix(launch): the dev flow stops on a failed migration (gh-#770) - #780

Merged
genwave-radio merged 2 commits into
mainfrom
fix/launch-stops-on-failed-migration-770
Sep 15, 2026
Merged

genwave-radio merged 2 commits into
mainfrom
fix/launch-stops-on-failed-migration-770

Conversation

@genwave-radio

Copy link
Copy Markdown
Collaborator

Closes #770

What

  • The default ./launch.sh flow called ./migrate.sh --keep-going … || true, so a failed migration was printed and the whole stack was then started against the incomplete schema.
  • The dev flow now runs ./migrate.sh fail-fast. On a non-zero exit it stops through preflight_fail (exit 3): the app is never started, the db container stays up for inspection, and the message names the re-run command. The dry-run plan line drops --keep-going. The pinned flow is unchanged.
  • migrate.sh comments describe the new caller contract (behaviour unchanged). Story414's dev-flow pin anchors on the dev-flow marker. DEPLOYMENT.md gains the recovery paragraph under "Applying migrations".

Specs

  • New Story436_LaunchStopsOnFailedMigration (17 facts, stubbed docker, scratch repo copy, planted db/99-spec-fail-migration.sh): red on main, green here.
  • Full solution green (Host 2848 passed / 57 skipped, 0 failed).

Wire check on the dev box (T469)

Untracked db/99-fail-migration.sh planted, then ./launch.sh:

    db/47-ad-spot-job-failed-kind-migration.sh ... ok
    db/99-fail-migration.sh ... FAILED — check 'docker compose logs db'
      ERROR:  relation "station.nope" does not exist
migrate.sh: stopping — a migration failed and --keep-going was not passed.
preflight: ✗ Schema migration failed — the application was NOT started against the incomplete schema.
  How to proceed:
    - The database is still up for inspection: docker compose logs db
    - Migrations are idempotent — fix the cause, then re-run: ./migrate.sh   (or simply: ./launch.sh)
EXIT=3

docker compose ps afterwards:

NAME           STATUS
genwave-db-1   Up 17 seconds (healthy)

File deleted, ./launch.sh again: ==> Schema migrations up to date==> Bringing the rest of the stack up, exit 0, all seven services healthy.

Follow-up (not this PR)

The dev-flow re-run hints (this one and three pre-existing) print a bare ./launch.sh and drop --piper-only; the pinned flow computes RELAUNCH for that (gh-#305). Hoisting that computation above the pinned branch would fix all four.

…migration (gh-#770)

Drives the real ./launch.sh dev flow against a scripted docker that fails one
planted migration, from a scratch symlink copy of the repo so the flow's
COMPOSE_FILE write never touches a developer's .env. Red until T468.
The default ./launch.sh flow called ./migrate.sh --keep-going ... || true, so a
failed migration was printed and then the whole stack was started against the
incomplete schema. The dev flow now calls ./migrate.sh fail-fast and, on a
non-zero exit, stops through preflight_fail: the app is never started, the db
container stays up for inspection, and the message names the re-run command.
The dry-run plan line drops --keep-going. The pinned flow is unchanged.

migrate.sh comments describe the new caller contract (behaviour unchanged).
Story414's dev-flow pin now anchors on the dev-flow marker so it reads the
right occurrence. DEPLOYMENT.md explains the recovery under Applying
migrations.
@genwave-radio
genwave-radio merged commit 008002e into main Sep 15, 2026
11 checks passed
@genwave-radio
genwave-radio deleted the fix/launch-stops-on-failed-migration-770 branch September 15, 2026 16:29
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

launch.sh: the dev path keeps launching after a failed migration (--keep-going || true)

1 participant