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 @@

Note +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. + + + + +
+ + + + @@ -790,6 +802,9 @@

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:

@@ -1071,7 +1086,7 @@

4.9. pgxntool-sync

-

This rule will pull down the latest released version of PGXNtool via git subtree pull and then reconcile the files setup.sh copied into your project (.gitignore, test/deps.sql) with a 3-way merge.

+

This rule will pull down the latest released version of PGXNtool via git subtree pull and then reconcile the files setup.sh copied into your project (.gitignore, test/deps.sql) with a 3-way merge (it also verifies the test/pgxntool symlink, recreating it if missing).

+
Note
+
While you can still run make installcheck or any other valid PGXS make target directly, it’s recommended to use make test when using pgxntool. The test target ensures proper test isolation and correct dependency installation.
@@ -1983,7 +1998,7 @@