ci: fail the build when the test suite fails - #180
Merged
Conversation
The test container ran `./bin/installcheck; cp ... || true`, so the trailing copy decided the container's exit code and every run reported success. A failing suite still produced a green check — see #179, where the new lint's regress test errored with `relation "lint.0030_invalid_index" does not exist` while the `tests` check stayed green. Copy the artifacts out as before, then exit with installcheck's status. Also add bin/check_lints.py, which catches the class of omission behind that failure: a lint that is not loaded by bin/installcheck, not unioned in queries_are_unionable.sql, undocumented, untested, or missing from the mkdocs nav. It runs as a pre-commit hook, so it gates every PR. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
soedirgo
force-pushed
the
fix/ci-exit-code
branch
from
August 4, 2026 06:46
d210ae3 to
7830a70
Compare
soedirgo
marked this pull request as ready for review
August 4, 2026 07:08
imor
approved these changes
Aug 5, 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?
CI fix.
What is the current behavior?
The
testscheck is green even when the suite fails.The test container runs:
installcheck's exit code is discarded by the;, and the trailing|| trueguarantees the container exits 0. Every run reports success.In #179, the new lint was never loaded by
bin/installcheck, so its regress test errored:What is the new behavior?
1. The container exits with
installcheck's status. Artifacts are still copied out on failure, soresults/regression.diffsremains available for debugging.2. New
bin/check_lints.py, wired in as a pre-commit hook (so it gates every PR via the existingpre-commit hooksworkflow). Registering a lint touches five files outsidelints/, and forgetting most of them fails quietly. For eachlints/NNNN_<name>.sqlit asserts:lint."NNNN_<name>"(matches the file stem)bin/installcheckloads ittest/sql/queries_are_unionable.sqlunions itdocs/NNNN_*.mdexiststest/sql/NNNN_*.sqlandtest/expected/NNNN_*.outexistmkdocs.yamllinks the doc pagePlus: no two lints share a number, and every numbered doc page is in the nav.
Run against #179's first commit, it reports exactly what was missing: