Repository navigation
feat(plan): will-run / won't-run summary and a clearer Renames section - #1602
Merged
Merged
Conversation
…rations apart, and renames marked in the plan JSON (CHI-1563)
…r client, and keep read failures to their group - The server client copied a plan summary's fields one by one and dropped migration_steps, so the Renames and migrations section lost its data moves and its step count on a real server. It is now required on every summary and copied; a summary without it is refused. - A browser test runs the plan page through the real server client against a faked control server (e2e/support/fake-plans.ts), covering migration_steps, origin_model, old_name and is_rename; it fails when the client drops the step count again. - A failed read is kept to its group, warnings included, and to paging or filtering in Renames and migrations; a re-plan clears them all. - The static demo's plan previews predated plan summaries and paged sections; they are recorded again from DuckShop on sqb dev through the summary, rows and diff reads (scripts/record-demo-plans.mjs).
…n output constants, and branch-free test helpers
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
On a large project the plan page opened on long lists without saying what the command would actually do. Renamed models were mixed in with the other migrations, so a rename read as several unrelated steps.
Changes
old → new, with what stays at the old name, apart from the migration steps by kind. Its filter finds a renamed model by its old name.origin_modelandold_name, and every migration row hasis_rename. The server's plan summary hasmigration_steps, the steps other than renames' own migrations.sectionsandmigration_stepson a server plan summary and refuses one without them, so the server and the UI must run the same version. There is no fallback for older servers.ui/scripts/record-demo-plans.mjs).Verification
ui/e2e/plan-server.spec.tsruns the plan page through the real server client against a faked control server and coversmigration_steps,origin_model,old_name,is_renameand the server filter. It fails when the client drops the step count.cargo test -p sqlbuild-core plan_display, clippy, the CLI plan JSON and migration integration tests.sqb devon a DuckDB project with a renamed model, and the static demo's plan pages.make check-ci.