fix(launch): the dev flow stops on a failed migration (gh-#770) - #780
Merged
Merged
Conversation
…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.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Closes #770
What
./launch.shflow called./migrate.sh --keep-going … || true, so a failed migration was printed and the whole stack was then started against the incomplete schema../migrate.shfail-fast. On a non-zero exit it stops throughpreflight_fail(exit 3): the app is never started, thedbcontainer 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.shcomments describe the new caller contract (behaviour unchanged). Story414's dev-flow pin anchors on the dev-flow marker.DEPLOYMENT.mdgains the recovery paragraph under "Applying migrations".Specs
Story436_LaunchStopsOnFailedMigration(17 facts, stubbeddocker, scratch repo copy, planteddb/99-spec-fail-migration.sh): red on main, green here.Wire check on the dev box (T469)
Untracked
db/99-fail-migration.shplanted, then./launch.sh:docker compose psafterwards:File deleted,
./launch.shagain:==> 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.shand drop--piper-only; the pinned flow computesRELAUNCHfor that (gh-#305). Hoisting that computation above the pinned branch would fix all four.