Skip to content

fix: release-time manifest-version guard + honest install docs (#90, #91) - #95

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/90-91-release-version-and-docs
Sep 5, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
fix/90-91-release-version-and-docs

Conversation

@scttfrdmn

Copy link
Copy Markdown
Collaborator

Summary

These are handled together because #91's root cause — a version-bump miss that a source-line check couldn't catch — is also why #90's documented path could never be relied on even once corrected: the only path that reliably works today is the manual-unpack one, so that's now the primary documented instructions.

What changed

#91 — release-time guard (scripts/check-release-version.sh)

  • New script: builds the plugin zip for real (./gradlew assemble), unzips classes/META-INF/MANIFEST.MF, and compares the manifest's actual Plugin-Version (and Plugin-Id) against the tag — not a restated copy of the source line. Also keeps the pre-existing "CHANGELOG has a ## [X.Y.Z] section, not still [Unreleased]" check.
  • .github/workflows/release.yml: replaced the old "grep build.gradle's version line" step + separate "Build plugin zip" step with a single "Release version guard" step that calls the new script (which builds the zip itself and leaves it in build/distributions for the publish step).
  • Shape mirrors lagotto's scripts/check-release-version.sh (release-time guard that builds-then-verifies the real artifact, invoked from the release workflow, backed by a companion unit-test suite) — adapted from Go ldflags/cmd.Version to this project's Gradle-generated MANIFEST.MF.
  • Current version check: build.gradle's version on main is 0.10.0, matching the latest tag v0.10.0. I rebuilt v0.10.0 locally and its manifest correctly reports Plugin-Version: 0.10.0 — I also re-downloaded the actual published v0.10.0 release asset from GitHub twice (via gh release download and via a fresh curl, confirming the sha256 matches the local rebuild byte-for-byte) and its manifest also reports 0.10.0, not 0.8.0. So the specific artifact described in v0.10.0 release zip ships a 0.8.0 plugin manifest (tag/version mismatch → wrong plugin id) #91 is not reproducible against the current published asset — whatever produced the stale 0.8.0 manifest (a stale local build, a since-corrected re-run, or an earlier version of the asset) is not present now. The guard closes the underlying gap either way: nothing before this PR verified the built artifact at all.

#90 — README install docs

  • Installation section now leads with: download the release zip → unpack into ~/.nextflow/plugins/<id>-<version>/ → reference the same version in nextflow.config. Verified the unzip destination shape matches exactly what Nextflow expects (~/.nextflow/plugins/nf-spawn-X.Y.Z/classes/META-INF/...).
  • The registry form (plugins { id '[email protected]' }) is kept (it's still needed once the plugin is installed locally) but is now explicitly called out as not resolvable from the registry — nf-spawn isn't listed in nextflow-io/plugins.
  • ./gradlew installPlugin (build-from-source) is kept as a secondary path.
  • Possible follow-up (not attempted here): submitting nf-spawn to the Nextflow plugin registry, if that's a small/known process — worth investigating separately.

Tests

  • src/test/groovy/io/nextflow/spawn/ReleaseVersionGuardTest.groovy (Spock):

    • feeds the guard a hand-crafted zip whose manifest says Plugin-Version: 0.8.0 against tag v0.10.0 and asserts it fails (reproduces the exact v0.10.0 release zip ships a 0.8.0 plugin manifest (tag/version mismatch → wrong plugin id) #91 shape)
    • feeds it a matching manifest/tag and asserts it passes (anti-vacuous)
    • feeds it a zip with no manifest at all and asserts it fails
    • asserts .github/workflows/release.yml still invokes scripts/check-release-version.sh
    • asserts the workflow no longer relies solely on the old source-line grep

    Confirmed fail-without/pass-with by hand: commenting out the guard's invocation in the workflow fails the "workflow still invokes" test; corrupting the guard's comparison logic (if false; then ... in place of the mismatch check) fails the "guard fails a mismatched manifest" test. Both pass again once reverted.

CHANGELOG

Test plan

  • ./gradlew clean test — full Spock suite green (101 tests across 4 spec files, incl. 5 new)
  • shellcheck scripts/check-release-version.sh — clean
  • bash scripts/verify-pins.sh — all 12 action pins still verified
  • Manually ran the guard against the real v0.10.0 tag/build — passes
  • Manually ran the guard against a deliberately wrong tag (v0.99.0) — fails with a clear error naming both the manifest's actual version and the expected one

)

The v0.10.0 release zip's MANIFEST.MF declared Plugin-Version: 0.8.0 while
shipping under the v0.10.0 tag. The existing release-workflow check only
compared the tag to build.gradle's source `version = '...'` line, which was
already correct — it never looked at what the built artifact actually
contained, so it couldn't have caught this.

scripts/check-release-version.sh replaces that check: it builds the real
plugin zip, unzips MANIFEST.MF, and compares the manifest's own
Plugin-Version (and Plugin-Id) against the tag, plus the existing
CHANGELOG [Unreleased]-promotion check. Mirrors the shape of lagotto's
scripts/check-release-version.sh (build-then-verify-the-real-artifact)
adapted to this project's Gradle/manifest release shape rather than Go
ldflags. A companion Spock suite (ReleaseVersionGuardTest) feeds the guard
a hand-crafted zip with a mismatched manifest and confirms it fails, a
matching one and confirms it passes, and asserts the release workflow still
invokes the script.

Separately, README's Installation section led with
`plugins { id '[email protected]' }`, which resolves against the Nextflow
plugin registry — nf-spawn isn't published there, so that snippet fails on
a clean machine. The working path (download the release zip, unpack into
~/.nextflow/plugins/) is now primary; the registry form is marked
not-yet-available.
@scttfrdmn
scttfrdmn force-pushed the fix/90-91-release-version-and-docs branch from 0454e0e to 806ba57 Compare September 5, 2026 21:27
@scttfrdmn
scttfrdmn merged commit 7412d54 into main Sep 5, 2026
4 checks passed
@scttfrdmn
scttfrdmn deleted the fix/90-91-release-version-and-docs branch September 5, 2026 21:33
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