Skip to content

Spack V1 Migration Feature: Reserved Spack Definitions#332

Merged
CodeGat merged 21 commits intospack-v1-migrationfrom
spack-v1-migration-reserved-defs
Jan 16, 2026
Merged

Spack V1 Migration Feature: Reserved Spack Definitions#332
CodeGat merged 21 commits intospack-v1-migrationfrom
spack-v1-migration-reserved-defs

Conversation

@CodeGat
Copy link
Member

@CodeGat CodeGat commented Nov 26, 2025

Closes #330
Will be merged into #326

Background

Root specs are very meaningful in our infrastructure. This comes with a few downsides, mostly in the cases where we have multiple specs in the speclist, or regular users want to use prerelease manifests in their own instances but can't due to prerelease-specific modifications of the root spec.

In this PR, we move away from important information being in the .spack.specs[0] field, and instead use reserved, dummy definitions at the top of the file:

spack:
  definitions:
  - _name: [access-om2]
  - _version: [2025.11.000]
  specs:
  - access-om2
  # ...

This means that speclists can be free from infra-specific information, and they are open to future modification.

The PR

  • Rename the get-spack-root-spec action to the more apt get-spack-manifest
    • Also update the outputs - simplified to deployment-{name|version} outputs, equivalent to .spack.definitions[]._{name|version}[0] fields.
  • Update all usages of the get-spack-root-spec action to get-spack-manifest
  • Update the internals of injection to allow multiple of the same spec, using this rule:
    • If there are no projections defined, make them of the form {name}/prX-Y/{hash:7}
    • If there are projections defined, infix the deployment number. This is of the form: {name}/prX-Y/DEMARCATOR, where the DEMARCATOR is the defined projection. For example, {name}/prX-Y/{variants.x}x{variants.y}
    • This is the same for Releases, except using the _version. It is not yet allowed in Releases.

Testing

Testing Details in this collapsed section

Unit Tests

Done via pytest, all pass.

MDR Testing

Done for regular MDRs in ACCESS-NRI/ACCESS-TEST#60

Prerelease (Draft)

Success, see https://github.com/ACCESS-NRI/ACCESS-TEST/actions/runs/19916256065

Prerelease (Ready For Review)

Success, see https://github.com/ACCESS-NRI/ACCESS-TEST/actions/runs/20013811438

Prerelease (!redeploy)

Expected failure, since the schema version updates are not yet on the main branch (since comment triggers are technically in the context of the main branch). But, the only points of difference (The status setting in https://github.com/ACCESS-NRI/ACCESS-TEST/actions/runs/20014778511/job/57390074093 and https://github.com/ACCESS-NRI/ACCESS-TEST/actions/runs/20014778511/job/57390091047) succeeded as expected.

Software Deployment Repository Testing

Done for Software Deployment Repostiories in ACCESS-NRI/system-tools#19

Prerelease (Draft)

Succeeded, see https://github.com/ACCESS-NRI/system-tools/actions/runs/20151461268?pr=19

Prerelease (Ready For Review)

Succeeded. see https://github.com/ACCESS-NRI/system-tools/actions/runs/20217336546?pr=19

Prerelease (!redeploy)

Expected failure, since the schema version updates are not yet on the main branch (since comment triggers are technically in the context of the main branch). But, the only points of difference (The status setting in https://github.com/ACCESS-NRI/system-tools/actions/runs/20217823516/job/58033899157 and https://github.com/ACCESS-NRI/system-tools/actions/runs/20217823516/job/58033912451) succeeded as expected.

@CodeGat CodeGat self-assigned this Nov 26, 2025
@CodeGat CodeGat added the type:feature New feature label Nov 26, 2025
@CodeGat CodeGat added priority:high version:MAJOR Requires an update to Model Deployment Repositories CI for:v8 Applies to v8 labels Nov 26, 2025
@CodeGat CodeGat force-pushed the spack-v1-migration-reserved-defs branch from d9694d0 to 857bbd2 Compare November 27, 2025 02:32
@CodeGat CodeGat moved this from New Issues 🌅 to Review 👏 in Spack `0.22` to `1.0` Migration Dec 1, 2025
@CodeGat CodeGat marked this pull request as ready for review December 1, 2025 02:35
@CodeGat
Copy link
Member Author

CodeGat commented Dec 4, 2025

This looks about ready to go!

Copy link
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.

An initial pass, but might need a peer-review to ask some more questions.

@CodeGat CodeGat requested a review from harshula as a code owner December 18, 2025 06:04
@CodeGat CodeGat force-pushed the spack-v1-migration-reserved-defs branch from e871355 to db7e3db Compare December 18, 2025 22:41
@CodeGat
Copy link
Member Author

CodeGat commented Dec 19, 2025

After the rebase onto v7, I note that it still works fine 👍 See ACCESS-NRI/ACCESS-TEST#60 (comment)

@CodeGat CodeGat force-pushed the spack-v1-migration-reserved-defs branch from 984b2d3 to 2d1bac4 Compare January 13, 2026 03:06
@CodeGat CodeGat removed the request for review from harshula January 13, 2026 03:54
@CodeGat CodeGat force-pushed the spack-v1-migration-reserved-defs branch from 1a53fa3 to 5a1c869 Compare January 13, 2026 04:33
@CodeGat
Copy link
Member Author

CodeGat commented Jan 15, 2026

After the rebase, I note it has passed testing: ACCESS-NRI/ACCESS-TEST#60 (comment)

@CodeGat CodeGat force-pushed the spack-v1-migration-reserved-defs branch 2 times, most recently from b81b2df to 6a99772 Compare January 15, 2026 23:41
@CodeGat CodeGat force-pushed the spack-v1-migration-reserved-defs branch 2 times, most recently from 644da23 to 16fc6c6 Compare January 15, 2026 23:55
@CodeGat CodeGat force-pushed the spack-v1-migration-reserved-defs branch from 7aebf30 to 5a1c7e3 Compare January 16, 2026 00:11
Copy link
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.

LGTM, thanks! Nice work.

@CodeGat CodeGat merged commit c80f3aa into spack-v1-migration Jan 16, 2026
@github-project-automation github-project-automation bot moved this from Review 👏 to Done ✅ in Spack `0.22` to `1.0` Migration Jan 16, 2026
@CodeGat CodeGat deleted the spack-v1-migration-reserved-defs branch January 16, 2026 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

for:v8 Applies to v8 priority:high type:feature New feature version:MAJOR Requires an update to Model Deployment Repositories CI

Projects

Status: Done ✅

Development

Successfully merging this pull request may close these issues.

2 participants