Make check-test-install-error-stop.sh order-sensitive for ON_ERROR_STOP - #122
Open
jnasbyupgrade wants to merge 1 commit into
Open
jnasbyupgrade wants to merge 1 commit into
jnasbyupgrade wants to merge 1 commit into
Conversation
The bare substring grep for ON_ERROR_STOP passed any file mentioning the variable at all, including one that only ever turns it off. Read \set ON_ERROR_STOP statements (and psql.sql inclusion) in file order and require an explicit on-value to have been seen; a later explicit off no longer masks the absence of an on. Addresses maintainer review feedback on Postgres-Extensions#109: Postgres-Extensions#109 (comment) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Summary
Follow-up to #109's review:
check-test-install-error-stop.shdid a baregrep -q 'ON_ERROR_STOP'substring match, which passes any file thatmentions the variable at all — including one that only ever turns it
off. Per maintainer feedback
(#109 (comment)),
the check now reads each file's
\set ON_ERROR_STOPstatements (and\i/\ir ... psql.sqlinclusion) in file order and requires an expliciton-value to have been seen somewhere in the file. A later explicit
turn-off no longer masks the absence of an earlier turn-on.
Paired with Postgres-Extensions/pgxntool-test#86, which adds the test
coverage for this.
Test plan
test/install/directory before pushing.🤖 Generated with Claude Code