Skip to content

Clone jigsaw-python over HTTPS and at a requested ref - #575

Merged
xylar merged 2 commits into
E3SM-Project:mainfrom
xylar:jigsaw-https-and-ref
Nov 25, 2026
Merged

xylar merged 2 commits into
E3SM-Project:mainfrom
xylar:jigsaw-https-and-ref

Conversation

@xylar

@xylar xylar commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

mache jigsaw install now clones jigsaw-python over HTTPS instead of SSH, and takes --jigsaw-python-ref to build a given commit, tag or branch. Until now, someone installing JIGSAW outside a downstream repository (for example, for polaris installed from conda-forge) needed a GitHub SSH key and got whatever jigsaw-python's default branch held that day, not the commit polaris pins.

With a ref, a missing source is cloned at that ref, and an existing checkout at a different commit stops the build instead of being moved. Without a ref, nothing changes but the URL.

Checklist

  • User's Guide has been updated if needed
  • Developer's Guide has been updated if needed
  • API documentation lists any new or modified class, method, or function
  • Documentation builds cleanly and changes look as expected
  • Tests pass and new features are covered by tests
  • PR description includes a summary and any relevant issue references
  • Testing comment, if appropriate, in the PR documents testing used to verify the changes

Posted by Claude Code on @xylar's behalf. The testing, analysis and wording above are AI-authored; please check them accordingly.

xylar and others added 2 commits November 25, 2026 16:41
`mache jigsaw install` clones jigsaw-python when the source is not
already there.  It cloned over SSH, which fails for anyone without a
GitHub SSH key, as is common on HPC login nodes and for users who
installed a downstream package such as polaris from conda-forge rather
than working in a clone.  jigsaw-python is public, so HTTPS works for
everyone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A downstream package pins the jigsaw-python commit it is tested with
(polaris through its jigsaw-python submodule), and JIGSAW's meshes
depend on its version.  But when mache had to clone jigsaw-python it
took a depth-1 clone of the default branch, so anyone installing JIGSAW
outside a clone of the downstream repository, e.g. for polaris installed
from conda-forge, silently built whatever jigsaw-python had that day.

`mache jigsaw install --jigsaw-python-ref REF` (and `jigsaw_python_ref`
in `deploy_jigsawpy()` and `build_jigsawpy_package()`) asks for a
commit, tag or branch:

* A missing source is cloned with `--filter=blob:none --no-checkout`
  and then checked out at REF.  The blobless clone has every commit, so
  an abbreviated commit works, but downloads only the files of the
  commit that is checked out.

* An existing checkout is never moved: it may be a submodule whose
  commit the enclosing repository records, or a clone with someone's
  work in it.  Instead, mache resolves REF there and stops before
  building if HEAD is a different commit or REF is unknown, saying to
  check out REF or remove the directory.

Without a ref, nothing changes.  The build cache key already includes
the source's HEAD, so a different ref gets its own build.

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

xylar commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

Testing

On Linux, in a conda environment with a local build of polaris 1.2.1 from conda-forge's dependencies, I ran mache jigsaw install --jigsaw-python-ref 46a26d38b27fcdd28be723c923ce677159d2b766 from an empty directory. It cloned jigsaw-python over HTTPS at that commit and built and installed jigsawpy 1.1.0 in about 2 minutes. After moving the clone to jigsaw-python's current master, the same command stopped before building:

RuntimeError: JIGSAW-Python at .../jigsaw-python is at commit 043e47a4dab2e5c58c26f63b6dc9b86c9cb93417, not at the requested ref '46a26d38b27fcdd28be723c923ce677159d2b766' (46a26d38b27fcdd28be723c923ce677159d2b766).  Check out '46a26d38b27fcdd28be723c923ce677159d2b766' there, or remove the directory so that mache clones JIGSAW-Python at '46a26d38b27fcdd28be723c923ce677159d2b766'.

Posted by Claude Code on @xylar's behalf. The testing, analysis and wording above are AI-authored; please check them accordingly.

@xylar xylar self-assigned this Nov 25, 2026
@xylar
xylar merged commit 4a45374 into E3SM-Project:main Nov 25, 2026
9 checks passed
@xylar
xylar deleted the jigsaw-https-and-ref branch November 25, 2026 16:45
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