Repository navigation
Reject PGXNTOOL_PGTLE_VERSION values that aren't an exact pg_tle range name - #134
Merged
jnasbyupgrade merged 2 commits intoOct 7, 2026
Conversation
`make pgtle PGXNTOOL_PGTLE_VERSION=...` and `pgtle.sh --pgtle-version` used the value verbatim as the output directory name, so a plain pg_tle version such as `1.5.0` silently produced a bogus `pg_tle/1.5.0/` directory with an "unknown" capability. `pgtle.sh` now accepts only the names in `PGTLE_VERSIONS` (`1.0.0-1.4.0`, `1.4.0-1.5.0`, `1.5.0+`) and otherwise errors, listing the valid ranges. When the value parses as a plain version, the error also names its range via the `--get-dir` logic (e.g. "did you mean 1.5.0+?"). `--get-dir` itself is unchanged. README.asc/README.html: the two sentences saying other values are passed through unvalidated now describe the error instead. Related changes in pgxntool-test: - New `test/standard/pgtle-version-validate.bats` invokes `pgtle.sh` directly: accepted ranges, plain versions with the hint, garbage values Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
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 |
jnasbyupgrade
added a commit
to Postgres-Extensions/pgxntool-test
that referenced
this pull request
Oct 7, 2026
Related pgxntool PR: Postgres-Extensions/pgxntool#134 Tests for `pgtle.sh --pgtle-version`, which now accepts only an exact pg_tle range name (`1.0.0-1.4.0`, `1.4.0-1.5.0`, `1.5.0+`) and rejects a plain pg_tle version with a "did you mean <range>?" hint.
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.
make pgtle PGXNTOOL_PGTLE_VERSION=<value>andpgtle.sh --pgtle-version <value>now fail unless<value>is exactly one of the pg_tle range names inpgtle.sh'sPGTLE_VERSIONS:1.0.0-1.4.0,1.4.0-1.5.0or1.5.0+. Before this change, any value was used verbatim as the output directory, so a plain pg_tle version such as1.5.0silently created a boguspg_tle/1.5.0/directory with capabilityunknown.pgtle.sh's--pgtle-versionhandling, somake pgtleand directpgtle.shcalls both get it. The list of valid ranges comes fromPGTLE_VERSIONS, not from a second hardcoded list.--get-dirlogic, including its pre-release handling (1.5.0rc1maps to1.4.0-1.5.0). It is only shown when--get-diraccepts the value;latest, an empty value, and1.5.1000get only the list of valid ranges.--get-dirruns as a child process becauseget_version_dirdepends on errexit to stop when parsing fails, and bash suspends errexit inside anifcondition. Called in-process,latestcame back as1.5.0+.--get-dir's own behavior is unchanged.Why validate instead of mapping a plain version to its range
Merge order
This adds behavior, so merge this PR before the paired pgxntool-test PR (pgxntool-test CLAUDE.md, "Merge Order for Paired PRs"). Until this PR lands, the new tests fail against pgxntool master.
Related pgxntool-test PR: Postgres-Extensions/pgxntool-test#101
🤖 Generated with Claude Code