Repository navigation
Fix silent failures in nix.checks - #2649
Merged
Merged
Conversation
The check harness runs `pg_prove migrations/tests/test.sql`, but the script doesn't use errexit (bashOptions is only nounset and pipefail) and this step lacked the `if ! ...; then exit 1` guard every other step has. A failing run logged "Result: FAIL" to debug.log, then printed "Migrations tests completed successfully" and the check went green. debug.log is only shown when the script exits non-zero, so the failures never appeared in CI logs. Wrap the step like the others so failures fail the check. That exposed 7 failing assertions in migrations/tests/storage/exists.sql (storage.buckets, storage.objects, storage.migrations and the foldername/filename/extension/search functions). Those objects were moved out of this repo in #1911 ("remove precreated Storage objects"): the Storage service now creates them with its own migrations, and our init script only creates the storage schema, the supabase_storage_admin role and grants. #1911 updated the tests that could fail (nix/tests/sql/storage.sql, testinfra, schema snapshots), but these assertions were missed because their failure was hidden. Replace them with checks for what this repo still owns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nix/docs/adding-tests.md (and README.md) say pgTAP files in nix/tests/smoke/ are run with pg_prove by `nix flake check`, but nothing has run them since the check-harness rewrite in #1399, which dropped the `pg_prove ... ${sqlTests}/*.sql` line. Add the step back, after the migration tests and against the same migrated cluster, skipped for CLI variants like the migration tests (pgtap isn't in prime-cli.sql). Two of the six files had gone stale while they weren't running: - 0002-supautils.sql asserted that supautils is not loaded until an explicit LOAD. The harness now preloads it via session_preload_libraries, as production does, so that can't hold. Assert instead that it is preloaded and that privileged_extensions (from ansible/files/postgresql_config/supautils.conf.j2) is populated and includes a few known entries. - 0003-pgsodium-vault.sql looked up a secret created with a custom pgsodium key by key_id. Since supabase_vault 0.3.0 the key-id argument of vault.create_secret is unused: every secret is encrypted with the internal key and key_id is stored as NULL (the 0.2.8 -> 0.3.0 upgrade also re-encrypts existing secrets that way). All variants ship 0.3.2. Look the secret up by name, assert key_id is NULL, and fix the two test labels, which were swapped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PostgreSQL Extension Dependency Analysis: PR #2649
SummaryNo extensions had dependencies with MAJOR version updates. Full Analysis ResultsPostgreSQL 15 Extension DependenciesPostgreSQL 17 Extension DependenciesOrioleDB 17 Extension Dependencies |
PostgreSQL Package Dependency Analysis: PR #2649
SummaryNo packages had MAJOR version updates. Full Analysis ResultsPostgreSQL 15 Dependency ChangesExtracting PostgreSQL 15 dependencies...
Runtime Closure Size
Raw Dependency ClosurePostgreSQL 17 Dependency ChangesExtracting PostgreSQL 17 dependencies...
Runtime Closure Size
Raw Dependency Closure |
Package version diff: none (aarch64-linux, x86_64-linux) |
Collaborator
Sounds GREAT to me, I can't ❤️ this enough. |
mmlb
approved these changes
Nov 13, 2026
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.
What kind of change does this PR introduce?
Bug fixes in nix.checks to fix silently failing/ignored tests, along with updates to the SQL to get them passing again.
What is the current behavior?
Failures in pgTAP migration tests were silently ignored, and pgTAP smoke tests are no longer run.
What is the new behavior?
Builds now expose failures in both sets of tests. Assertions that have fallen out of date are fixed to keep the build green.
Additional context
We have additional SQL smoke tests in internal repos that we can move to
nix/tests/smoke, so I wanted to make sure these all run cleanly before doing that. Sound right, or is there a better location/plan?