diff --git a/HISTORY.asc b/HISTORY.asc index bdd5121..07ddbcb 100644 --- a/HISTORY.asc +++ b/HISTORY.asc @@ -1,3 +1,18 @@ +STABLE +------ +== Guarantee `test/install/*.sql` ordering +Install files ran in whatever order `$(wildcard)` happened to return -- +alphabetical in practice, but undocumented and not actually guaranteed. +A consumer with an implicit dependency between two install files (one +provisioning roles the other's `CREATE EXTENSION ... CASCADE` requires) +was silently relying on that accident. `TEST_INSTALL_SQL_FILES` is now +wrapped in `$(sort ...)`, which GNU Make implements as a plain byte-value +comparison independent of locale -- so ordering is now a documented +guarantee, not an accident of the filesystem. If install files have an +inter-file dependency, encode it via filename (e.g. a numeric prefix). + +Issues fixed in this release: #111 + 2.3.0 ----- == Rename `PGTLE_VERSION` to `PGXNTOOL_PGTLE_VERSION` diff --git a/README.asc b/README.asc index 45c4b59..4d3cce5 100644 --- a/README.asc +++ b/README.asc @@ -150,6 +150,8 @@ test/install/ The `schedule` file is generated automatically and listed in `.gitignore`. Do not edit it. +**Ordering:** Install files run in plain byte-value (ASCII) order of their filenames, guaranteed regardless of filesystem or locale. If one install file depends on another having already run, encode that dependency in the filenames themselves (e.g. `01_roles.sql` before `02_extension.sql`). + **Configuration:** The feature auto-detects based on whether `test/install/*.sql` files exist: diff --git a/README.html b/README.html index ba71c2a..c251e92 100644 --- a/README.html +++ b/README.html @@ -635,6 +635,18 @@
test exits non-zero (after printing regression.diffs) if any test fails. Previously it always exited 0 regardless of test results, silently masking failures from CI and other automation that relies on the exit code.
+