Skip to content

The documented install fails (not on PyPI), and the on-instance bootstrap resolves unpinned specs per job #13

Closed

Description

@scttfrdmn

Two things about getting this running, one a doc/release gap and one a reproducibility one. Both found while standing the plugin up for a cookbook recipe; neither is hard to fix.

1. pip install snakemake-executor-plugin-spawn cannot work — the package is not on PyPI

The README's Install section says:

pip install snakemake-executor-plugin-spawn

Measured:

$ pip download snakemake-executor-plugin-spawn --no-deps -d /tmp/pipdl
ERROR: Could not find a version that satisfies the requirement
snakemake-executor-plugin-spawn (from versions: none)
ERROR: No matching distribution found for snakemake-executor-plugin-spawn

This is the same shape as nf-spawn#90 (README implied the Nextflow plugin registry; it wasn't there), so it may be worth treating as one pattern across the adapters: the install line in the README is the first thing a new user runs, and on three of these it is the first thing that fails.

What does work, and what I'd suggest the README say until a release is published:

pip install "snakemake-executor-plugin-spawn @ git+https://github.com/spore-host/[email protected]"

There are v0.1.0 and v0.2.0 GitHub releases to pin against, so the git form is already reproducible — it just isn't documented. One more wrinkle worth a line in the README: Snakemake is commonly installed from Homebrew, whose Python is PEP 668 externally-managed, so pip install into it is refused outright. The plugin has to land in the same environment as Snakemake, which in practice means a venv holding snakemake + snakemake-storage-plugin-s3 + this plugin together. That took a couple of tries to work out and is not obvious from "requires the spawn and truffle CLIs on PATH".

2. Every job instance resolves Snakemake from PyPI at run time, unpinned

bootstrap.py:21-22:

DEFAULT_SNAKEMAKE_SPEC = "snakemake>=9,<10"
DEFAULT_STORAGE_SPEC = "snakemake-storage-plugin-s3"

and build_install_preamble runs, on each job's instance:

sudo /opt/snakemake-spawn-venv/bin/pip install --quiet "snakemake>=9,<10" "snakemake-storage-plugin-s3"

So the version of Snakemake that executes a job is whatever PyPI serves that instance at that moment. Two consequences:

  • Two jobs in one workflow can run different Snakemake versions — the fan-out launches instances minutes apart, and a release landing mid-workflow is enough. The storage plugin is wholly unpinned, which makes it the likelier of the two to move.
  • The submitting environment's version is not the executing one. I submitted from a venv at snakemake 9.27.0; nothing makes the instances agree with that, and nothing records what they resolved.

Neither is hypothetical in the sense that matters: the point of the spore.host model is that a run is reproducible because the thing that ran is identified. Here it isn't recorded anywhere, so a workflow cannot be re-run to the same software later even in principle.

Suggestions, cheapest first:

  1. Default the specs to the submitting environment's own versions — the executor can read importlib.metadata.version("snakemake") locally and pin snakemake==<that>, so the instances match the submitter by construction. This also removes the py3.9-vs-Snakemake-9 class of surprise the bootstrap.py docstring describes.
  2. Expose them as settings (--spawn-snakemake-spec / --spawn-storage-spec) so a caller can pin exactly, with the current ranges as defaults.
  3. Echo what was resolved into the job's log, so after the fact there is a record even if the pin is loose.

(1) alone would close most of it and is a few lines. Happy to send the PR — say which of these you'd want and I'll match the shape.

Activity

  1. scttfrdmn commented on Oct 4, 2026

    @scttfrdmn
    ContributorAuthor

    Refining part 1 — the publishing machinery exists; the trigger tag was never pushed

    I reported this as "not on PyPI", which is true but describes the symptom and implies more work than is needed. The actual state, found while rebasing onto current main:

    .github/workflows/publish-python.yaml already publishes to PyPI via Trusted Publishing (OIDC, no stored token, dedicated pypi environment) — added in #10 on 2026-09-05:

    on:
      push:
        tags:
          - "python-v*"

    And the tags that exist are:

    $ git tag
    v0.1.0 v0.2.0
    

    No python-v* tag has ever been pushed, so the workflow has never run. The CHANGELOG entry for #10 says as much and I missed it — "The existing vX.Y.Z-triggered release.yml (GitHub Release only) is unchanged; a PyPI publish is now a separate, deliberate tag." That separation is intentional and sensible; the consequence is just that the README's pip install line has been accurate-in-intent and false-in-fact since 0.2.0 shipped.

    So part 1 is one command, not a feature:

    git tag python-v0.2.0 v0.2.0 && git push origin python-v0.2.0

    (or python-v0.3.0 alongside the next release, if #14 lands first and you'd rather publish the version that has --spawn-cost-limit in it.)

    The two README notes still stand and are worth having either way, since they're true even once PyPI works:

    • the git-URL install form, for anyone wanting a specific commit;
    • the PEP 668 wrinkle — Snakemake is commonly installed from Homebrew, whose Python refuses pip install outright, so the plugin has to go into the same environment as Snakemake, which in practice means a venv holding snakemake + snakemake-storage-plugin-s3 + this plugin together.

    Part 2 (the unpinned on-instance bootstrap) is unchanged and is the more consequential half: DEFAULT_SNAKEMAKE_SPEC = "snakemake>=9,<10" with a wholly unpinned storage plugin means each job instance resolves whatever PyPI serves it, nothing makes the instances agree with the submitter, and nothing records what they got. Pinning to the submitting environment's own versions via importlib.metadata.version("snakemake") remains the cheapest fix and the one I'd reach for first.

  2. added a commit that references this issue on Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions