fix: create indexes after the tables they name
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 1m20s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images and notify Portainer (push) Successful in 1m37s
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 1m20s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images and notify Portainer (push) Successful in 1m37s
The 4.1 indexes were added beside the existing uploads_owner, which sits partway through schema.sql, so CREATE INDEX ... ON dtf_local.order_files ran before that table was created and bootstrap aborted with UndefinedTable. db-init then restarted on failure without ever completing, and everything waiting on it timed out. Every local run passed because those volumes already had the tables. Only a clean database exposes it, which is what CI has and my checks did not. All eleven indexes now sit at the end of the file, after every table, with an assertion in the change that each indexed table is created before its index. Verified from docker compose down -v: the stack starts, bootstrap completes, eleven indexes exist, and the full suite passes. Recorded as ROADMAP 5.11: nothing exercises the schema against an empty database, which is the only way this class of fault appears. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -432,6 +432,14 @@ charges. Fix as part of 1.1.
|
||||
table and the packer so 3.2 has somewhere to land.
|
||||
- `[ ]` 5.7 — Commercial rules duplicated between `FAIXAS` (JS) and `TIERS` (Python)
|
||||
`(F26)`. `test_pricing` guards parity; generate one from the other instead.
|
||||
- `[ ]` 5.11 — Nothing tests the schema against an empty database. The 4.1 indexes
|
||||
were added next to the existing one, which sits before the tables they name, so
|
||||
`CREATE INDEX ... ON dtf_local.order_files` ran before that table existed. Every
|
||||
local run passed because the volume already had the tables; CI caught it on its
|
||||
clean volume. A migration is only really exercised from nothing, so the
|
||||
integration job should run `down -v` before `up` — or a dedicated step should
|
||||
apply `schema.sql` twice to a fresh database, proving both a first install and
|
||||
a re-run.
|
||||
- `[ ]` 5.10 — The browser suites do not run in CI. Chrome runs in the runner
|
||||
container and can only reach the stack through ports published on the host, which
|
||||
is a different network namespace when the runner is itself a container. The API,
|
||||
|
||||
Reference in New Issue
Block a user