cat_tools' 0.3.0 release attempt failed at the PGXN upload step: META.in.json's
prereqs.build.requires.PostgreSQL was "12.0", and PGXN's own validation rejects that
as not a valid semver (it wants X.Y.Z, e.g. "12.0.0"). make tag/make dist had
already succeeded and pushed a git tag by the time this surfaced -- the only thing that
actually caught the bad version string was the PGXN upload itself, which isn't automated
(make dist produces a zip; upload is manual per each project's RELEASE.md), so the
failure showed up as far as possible from the tagging step that should have caught it.
Ask
Add a validation step to make dist/dist-only (and/or tag) that checks every
version-shaped string in the generated META.json -- at minimum
prereqs.*.*.* values that look like version requirements, plus version and
provides.*.version -- against a real semver/PGXN-version regex, and fails loudly
before tagging or archiving if anything doesn't conform. Catching this at make tag
time (which still requires a clean tree and is easy to re-run) is far cheaper than
catching it at manual PGXN upload time, after a tag already exists and history has moved
on.
Notes
- PGXN's spec (http://pgxn.org/spec/#version) requires versions to be valid per
version::is_lax / semver form -- a bare "12.0" (two components) doesn't qualify,
"12.0.0" does.
- Non-numeric special-cased versions like the
stable pseudo-version (see cat_tools'
release process) should presumably be exempted from the check, or the check should
only apply to prereq-style version requirement fields, not extension pseudo-versions --
worth deciding the exact scope when implementing.
cat_tools' 0.3.0 release attempt failed at the PGXN upload step:
META.in.json'sprereqs.build.requires.PostgreSQLwas"12.0", and PGXN's own validation rejects thatas not a valid semver (it wants
X.Y.Z, e.g."12.0.0").make tag/make disthadalready succeeded and pushed a git tag by the time this surfaced -- the only thing that
actually caught the bad version string was the PGXN upload itself, which isn't automated
(
make distproduces a zip; upload is manual per each project's RELEASE.md), so thefailure showed up as far as possible from the tagging step that should have caught it.
Ask
Add a validation step to
make dist/dist-only(and/ortag) that checks everyversion-shaped string in the generated
META.json-- at minimumprereqs.*.*.*values that look like version requirements, plusversionandprovides.*.version-- against a real semver/PGXN-version regex, and fails loudlybefore tagging or archiving if anything doesn't conform. Catching this at
make tagtime (which still requires a clean tree and is easy to re-run) is far cheaper than
catching it at manual PGXN upload time, after a tag already exists and history has moved
on.
Notes
version::is_lax/ semver form -- a bare"12.0"(two components) doesn't qualify,"12.0.0"does.stablepseudo-version (see cat_tools'release process) should presumably be exempted from the check, or the check should
only apply to prereq-style version requirement fields, not extension pseudo-versions --
worth deciding the exact scope when implementing.