Skip to content

build-ci v3: Infrastructure Update for spack v1.X#253

Merged
CodeGat merged 31 commits intov3from
spack-config-81-git-based-spack-packages-repo
Dec 8, 2025
Merged

build-ci v3: Infrastructure Update for spack v1.X#253
CodeGat merged 31 commits intov3from
spack-config-81-git-based-spack-packages-repo

Conversation

@CodeGat
Copy link
Copy Markdown
Member

@CodeGat CodeGat commented Nov 3, 2025

Closes #231
References #250, ACCESS-NRI/access-spack-packages#295

Important

This PR is a major update to the infrastructure, as package-repo-related inputs are being changed. See below for the prerequisites for this repository to be able to merge this PR.

Important

This major version change marks the end of major infrastructure updates for CI using spack < 1.0. They will still get bug fixes.
If you want to deploy to instances of spack < 1.0, you must use build-ci v2.
If you want to deploy to instances of spack >= 1.0, you must use build-ci v3.

Background

We are migrating over fully to spack v1.X!

In a similar vein to ACCESS-NRI/build-cd#326, this PR moves from keeping track of a single ACCESS-NRI/spack-packages repo; to both a spack/spack-packages repo (which we call the builtin repo), and an ACCESS-NRI/access-spack-packages repo.

Importantly, this major version change is a cut off for deployments to spack < 1.0. If you want to deploy to spack < 1.0, you must use the v2 instance of the workflow. This was done so steps in the workflows aren't doing equivalent but different commands based on the version of spack, eg. spack repo update for spack 1.0, vs git -C /opt/access-spack-packages pull in spack 0.22.

Just to preempt a potential niche usecase: It is still possible to test across versions of spack in build-ci, but it would require creation of two separate matrices for testing - one for spack < 1.0 (AKA build-ci@v2) and one for spack >= 1.0 (AKA build-ci@v3).

The PR

Entrypoint Workflows

  • Removed inputs.spack-packages-ref, added inputs.builtin-spack-packages-ref and inputs.access-spack-packages-ref. This is a major change.
  • Updated default inputs.access-spack-packages-ref from main to api-v2, and inputs.spack-ref to releases/v1.0.
  • Checkout updates to builtin and access spack-packages via spack post-compiler enable.
  • Updated step names.
  • Removed outputs.spack-packages-sha, replaced with outputs.builtin-spack-packages-sha and outputs.access-spack-packages-sha

Done in f2fd031

Images

  • Now have a build-time OCI-backed buildcache that is removed post-build. This is used to drasitically shorten the image creation time from around 2+ hours to around a 1/2 hour.
  • Now have configurable, spack-managed package repositories. This is different from the build-ci@v2 images, which had a static spack-managed builtin that couldn't be changed, and a path-based ACCESS-NRI/spack-packages repo.
  • Removed references to SPACK_PACKAGES configurable ARGS. This means that the spack-config ref is the sole provider of versions for the package repositories initial values. They can still be updated via inputs.*-spack-packages-ref.
    • Also removed references to SPACK_PACKAGES ENVs and LABELs.

Done in a09416f

Spack Manifests Used To Build Images

  • Updated compilers used to build the v1 images: They are equivalent compilers. Thanks @harshula for this. Done in 4dadf7c

Misc. Changes...

  • New action created: spack-checkout-updated-ref. This was created to encapsulate the spack repo update command, in a similar way to git-checkout-updated-ref. Done in 942ed78
  • Added tools/mcr-change folder for mass-creation of model component repository PRs for major updates to the infra, similar to build-cds tools/mdr-change. Done in d8e7dcc

Testing

Testing Details In This Collapsed Section

Valid Cases

New builtin Tag, Same (Not Updated) access-spack-packages Branch

New builtin Commit, New access-spack-packages Commit

No values for spack-ref/spack-config-ref/builtin-spack-packages-ref/access-spack-packages-ref

Invalid Cases

Spack < 1.0

access-spack-packages Run Through

See ACCESS-NRI/access-spack-packages#332 - all packages that expect to pass, pass. The other failures are related to attempts to access the Gadi FS.

Requirements for Merging

Requirements for Post-Merge

  • Tag new HEAD with rocky-v1.0-2025.12.000, as that is where the created image came from

@CodeGat CodeGat added type:feature New feature or request priority:high A high priority issue - has an impact on core functionality labels Nov 3, 2025
@CodeGat CodeGat self-assigned this Nov 3, 2025
@CodeGat CodeGat moved this from New Issues 🌅 to In Progress 🏗️ in Spack `0.22` to `1.0` Migration Nov 3, 2025
@CodeGat CodeGat changed the base branch from v2 to v3 November 3, 2025 04:38
@CodeGat CodeGat force-pushed the spack-config-81-git-based-spack-packages-repo branch from d207478 to fbb74a7 Compare November 3, 2025 04:42
CodeGat added a commit to CABLE-LSM/CABLE that referenced this pull request Nov 11, 2025
…nge (#653)

# CABLE

Thank you for submitting a pull request to the CABLE Project.

## Description

We are updating our `build-ci` infrastructure so it will be able to
support `spack >= v1.0` more fully. There is an incoming change (see
ACCESS-NRI/spack-config#82) to `spack-config` to
forward this goal, that will no longer work with `build-ci@v2`. There is
a new version of `build-ci@v3` (see
ACCESS-NRI/build-ci#253) that will work with
this new version of `spack-config`, but it is not yet ready for merging.

This interim fix for `build-ci@v2` will work while `build-ci@v3` is
being tested, so there is no downtime between versions, by pinning the
version of `spack-config` to a tag before the breaking change.

> [!NOTE]
> Open pull requests will need to be rebased to get this fix, or a
similar pinning of `spack-config-ref` in the PR added

## Type of change

- [x] Bug fix


<!-- readthedocs-preview cable start -->
----
📚 Documentation preview 📚:
https://cable--653.org.readthedocs.build/en/653/

<!-- readthedocs-preview cable end -->
@CodeGat CodeGat marked this pull request as ready for review November 16, 2025 22:40
@CodeGat CodeGat moved this from In Progress 🏗️ to Review 👏 in Spack `0.22` to `1.0` Migration Dec 2, 2025
@CodeGat
Copy link
Copy Markdown
Member Author

CodeGat commented Dec 8, 2025

Regarding 1: Excellent
Regarding 2: Noted, there is almost no difference when removing the explicit load, even for upstream compilers, which is excellent. The only failure was with issm, which I'm not sure has anything to do with removing the explicit compiler load - see https://github.com/ACCESS-NRI/access-spack-packages/actions/runs/20018453342/job/57424645032?pr=358#step:18:5078 EDIT: When rerunning, I got no such error. Removed explicit compiler load in 9225ee9
Regarding 3: Will do

@CodeGat CodeGat force-pushed the spack-config-81-git-based-spack-packages-repo branch from aadca03 to c0fef23 Compare December 8, 2025 22:02
@CodeGat
Copy link
Copy Markdown
Member Author

CodeGat commented Dec 8, 2025

Reviewed your comments @aidanheerdegen - thanks!!

Copy link
Copy Markdown
Member

@aidanheerdegen aidanheerdegen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@CodeGat CodeGat merged commit 7dc203b into v3 Dec 8, 2025
@github-project-automation github-project-automation bot moved this from Review 👏 to Done ✅ in Spack `0.22` to `1.0` Migration Dec 8, 2025
@CodeGat CodeGat deleted the spack-config-81-git-based-spack-packages-repo branch December 8, 2025 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:high A high priority issue - has an impact on core functionality type:feature New feature or request

Projects

Status: Done ✅

Development

Successfully merging this pull request may close these issues.

Support spack-packages to access-spack-packages, add upstream-spack-packages input

3 participants