Skip to content

RELEASE.md: multi-extension distribution versioning procedure - #16

Open
jnasbyupgrade wants to merge 1 commit into
Postgres-Extensions:mainfrom
jnasbyupgrade:test-factory-multi-extension-releases
Open

RELEASE.md: multi-extension distribution versioning procedure#16
jnasbyupgrade wants to merge 1 commit into
Postgres-Extensions:mainfrom
jnasbyupgrade:test-factory-multi-extension-releases

Conversation

@jnasbyupgrade

Copy link
Copy Markdown
Contributor

Summary

  • Documents the versioning procedure for a distribution that provides more than one extension (test_factory is the first repo in the org to actually need this: test_factory + test_factory_pgtap).
  • Key rule: the distribution version always advances at every release; each extension's own version only moves if its own sql/<ext>--<last-released>--stable.sql update script has real content by release time -- and when it does move, it moves to the same value as the new distribution version, not an independently-numbered scheme.
  • Requires maintaining a stable-target update script for every extension a distribution provides (not just the one(s) a given PR touches), so there's something to inspect per-extension at release time.
  • An untouched extension gets its default_version reverted to its own last real version for the tagged archive (never left at the literal stable), and its no-op update script gets excluded from the release archive via .gitattributes export-ignore.
  • Fixed a stale "step 7" cross-reference that should have said "step 8" (predates this change, caught while touching the same paragraph).
  • CLAUDE.md: documented a gotcha caught while implementing this on test_factory -- the stable pseudo-version's gitignore entry must name sql/<ext>--stable.sql exactly, not a sql/*--stable.sql glob (which also matches across the update script's own second -- and silently sweeps up a file that must stay committed).

Test plan

This is a documentation-only change. Verified against a real implementation on test_factory (Postgres-Extensions/test_factory#42): the export-ignore glob behavior, the no-op update script requirement (ALTER EXTENSION ... UPDATE genuinely fails without one, even for a no-op transition), and the gitignore glob-ambiguity gotcha were all confirmed directly there before writing this up.

A single distribution can provide more than one extension (test_factory
is the first repo in the org to actually hit this: test_factory +
test_factory_pgtap), each with its own default_version. The existing
process implicitly assumed one extension version moving in lockstep with
the distribution version -- doesn't work here, since most releases will
only touch one of the two extensions.

Documented the actual decision procedure: the distribution version
always advances at every release; each extension's own version only
moves if its sql/<ext>--<last-released>--stable.sql update script has
real content (inspected at release time), and when it does move, it
moves to the same value as the new distribution version rather than an
independently-numbered scheme. An extension with nothing pending gets
its default_version reverted to its own last real version for the
archive (never left at the literal 'stable' in a tagged release), and
its stable-named update script stays as a genuine no-op, excluded from
the release archive via .gitattributes export-ignore rather than
git mv'd to a real name.

This requires maintaining a stable-target update script for every
extension a distribution provides, not just the one(s) a given PR
happens to touch -- otherwise there's nothing to inspect at release
time to decide whether an untouched extension needs anything at all.
Added that to the "ongoing development" section, and fixed a stale
"step 7" cross-reference (should have said step 8) that predated this
change but was caught while touching the same paragraph.

CLAUDE.md: also documented a gotcha caught while implementing this on
test_factory -- the stable pseudo-version's gitignore entry must name
sql/<ext>--stable.sql exactly, not a sql/*--stable.sql glob, since that
glob's `*` also matches across the update script's own second `--` and
silently sweeps up a file that must stay committed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 12, 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: Pro Plus

Run ID: 3731edaf-9813-41f7-afcd-7ab1fa9c425f

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

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.

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