Run the integration suite when the seed changes - #2394
Merged
Conversation
Unrelated to this PR's subject, and pre-existing on main: 9494e31 left plans/mu-ziq-replacement-char-remediation.md with emphasis markers prettier rewrites, so format:check has been failing on main since. The change here is entirely prettier --write output, asterisk emphasis to underscore, no prose touched. It went unnoticed for the same reason this PR exists. That commit touched only plans/, which no paths-filter entry covers, so lint-and-typecheck never ran on it. This PR's workflow edit is what pulled the job back in and surfaced it. Fixed here rather than split out because format:check gates lint-and-typecheck, which gates Integration-Tests -- the job this PR adds the seed to. Leaving it red would leave the seed unexecuted, which is the thing being fixed.
A change to seed_db.sql or init-db.mjs executed neither file in CI. Both are in the db-init filter, but db-init gates only the migration dry-run, which applies migrations and stops short of the seed. The integration suite -- the one job that builds a database from this seed and asserts against it -- keys off apps, jobs, shared and tests, none of which a dev_env change matches. Observed on a branch that added rows to seed_db.sql and two counts to init-db.mjs: the run went green with Integration-Tests reporting success in fourteen seconds, having executed neither file. With db-init added to the gate, the same branch ran the suite for two and a half minutes and failed a spec. That failure is real and predates this change being able to see it. The failure this now catches is a seed that does not apply, or that applies different rows than a spec expects, which otherwise surfaces at the next developer's first run against a database nobody had rebuilt yet.
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.
A change to
dev_env/seed_db.sqlordev_env/init-db.mjsexecutes neither file in CI.Both are in the
db-initfilter, butdb-initgates onlymigrate-dryrun, which applies migrations and stops short of the seed. The integration suite -- the one job that builds a database from this seed and asserts against it -- keys offapps,jobs,sharedandtests, none of which adev_envchange matches.Observed, not theorised
On a branch adding rows to
seed_db.sqland two counts toinit-db.mjs, the run went green withIntegration-Testsreporting success in 14 seconds, having executed neither file.With
db-initadded to the gate, that same branch ran the suite for 2m39s and failed a spec (flowsheet-upcoming-show.spec.js, a scan-count ceiling). That failure is real, is reachable frommaintoday, and nothing reported it before this change. It is being worked separately in #2392 -- this PR is only the gate.Second commit: an unrelated red on main
format:checkis currently failing onmain. 9494e31 leftplans/mu-ziq-replacement-char-remediation.mdwith emphasis markers prettier rewrites.It went unnoticed through the same hole this PR closes, one filter over: that commit touched only
plans/, which no filter covers, solint-and-typechecknever ran on it. The fix here is entirelyprettier --writeoutput -- asterisk emphasis to underscore, no prose changed.It is included rather than split because
format:checkgateslint-and-typecheck, which gatesIntegration-Tests; without it this PR cannot demonstrate its own effect. Happy to split it if you would rather review them apart.Worth considering separately
plans/**still triggers no job. This PR does not widen the filter to cover it -- that is a judgement about whether plan documents should hold up CI, which is worth deciding deliberately rather than as a side effect of this fix.