Skip to content

Test pgtle.sh --pgtle-version range-name validation - #101

Merged
jnasbyupgrade merged 2 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:pre-2.4.0-pgtle-version-validate
Oct 7, 2026
Merged

jnasbyupgrade merged 2 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:pre-2.4.0-pgtle-version-validate

Conversation

@jnasbyupgrade

Copy link
Copy Markdown
Contributor

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 ?" hint.

New test/standard/pgtle-version-validate.bats calls pgtle.sh directly on a bare scratch extension, with no foundation environment, no make and no PostgreSQL:

  • Each exact range name generates only pg_tle/<range>/.
  • Plain versions fail with the hint naming the range that --get-dir puts them in. Cases: 1.0.0, 1.3.9, 1.4.0, 1.5.0rc1, 1.5.0, 1.5.2, which cover both range boundaries and a pre-release.
  • Unparseable values (latest, empty, 1.5.1000) fail with the list of valid ranges and no hint.

No new make-level test: make pgtle only forwards PGXNTOOL_PGTLE_VERSION to --pgtle-version, and 04-pgtle.bats already covers that forwarding.

Merge order

Merge Postgres-Extensions/pgxntool#134 first. This PR adds coverage for behavior that PR adds. If this PR merges first, the new tests fail against pgxntool master for every unrelated pgxntool-test PR (CLAUDE.md, "Merge Order for Paired PRs").

🤖 Generated with Claude Code

Add tests for pgxntool Postgres-Extensions/pgxntool#134 (fd92287) (reject values that aren't an exact pg_tle range name):
- `pgtle.sh --pgtle-version` accepts only `1.0.0-1.4.0`, `1.4.0-1.5.0`, `1.5.0+`
- A plain pg_tle version errors with a "did you mean <range>?" hint

New `test/standard/pgtle-version-validate.bats` invokes `pgtle.sh` directly
against a bare scratch extension (no foundation, no make, no PostgreSQL):
- Each exact range name generates only `pg_tle/<range>/`
- Plain versions, including both range boundaries and a pre-release, fail
  with the hint naming the range `--get-dir` puts them in
- Unparseable values (`latest`, empty, an out-of-range component) fail
  with the valid-range list and no hint

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: d3794fc4-8768-48dc-9ab1-8b940c7bfd95

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

jnasbyupgrade added a commit to Postgres-Extensions/pgxntool that referenced this pull request Oct 7, 2026
…e name (#134)

`make pgtle PGXNTOOL_PGTLE_VERSION=<value>` and `pgtle.sh
--pgtle-version <value>` now fail unless `<value>` is exactly one of the
pg_tle range names in `pgtle.sh`'s `PGTLE_VERSIONS`: `1.0.0-1.4.0`,
`1.4.0-1.5.0` or `1.5.0+`.

Related pgxntool-test PR:
Postgres-Extensions/pgxntool-test#101
@jnasbyupgrade
jnasbyupgrade merged commit 7fbe35e into Postgres-Extensions:master Oct 7, 2026
9 checks passed
@jnasbyupgrade
jnasbyupgrade deleted the pre-2.4.0-pgtle-version-validate branch October 7, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant