Closed CodeGat closed 1 month ago
The reason for the above requirement is because we have two installation methods:
1) spack install mom5@access-esm1.5
2) via spack.yaml
, ideally we want to be able to do:
spack:
packages:
mom5:
require:
- '@git.access-esm1.5_2024.05.21'
I have started working on the issue at the 111-apply-branch-specific-logic-to-some-tags
branch and have come to the realization that we don't need to change the SPDs at all. Instead, change the spec syntax from @tag
to @tag=version
.
See https://spack.readthedocs.io/en/latest/basic_usage.html#git-versions
For example:
spack install mom5@git.access-esm1.5_2024.05.24=access-esm1.5^oasis3-mct@git.access-esm1.5_2024.05.24=access-esm1.5%intel@19.0.5.281 arch=linux-rocky8-x86_64
That way you specify both the exact Git tag that you want, and the exact version that you need. The SPD can just continue to use logic based on the version. How's that sound?
That changes the second installation method to:
spack:
packages:
mom5:
require:
- '@git.access-esm1.5_2024.05.21=access-esm1.5'
Closing, since this issue doesn't require a code change in this repository.
In the cases of
mom5
andoasis3-mct
, we currently have branch-specific (specifically,access-esm1.5
) logic. This means that for the deployment ofACCESS-ESM1.5
via thespack.yaml
(see here), we must use the branch version (such as@access-esm1.5
). For example: https://github.com/ACCESS-NRI/ACCESS-ESM1.5/pull/5/files#diff-e8582e74fa156f4e5729a850e52b24f2fde2d815c2c9c360f88c4cf90db851abR12-R14However, this branch version is not specific enough for the purposes of editing the
spack.yaml
in a PR, as it simply points to theHEAD
of said branch, which will change based on the time that aspack.yaml
is deployed. This would mean that PRs would essentially be unchanged (maybe putting a comment in saying what commit was atHEAD
at that point in time). We currently use tags instead of branches for this purpose (for example,@git.2024.05.12
), since they are a specific point in time.Is it possible to have this branch-based logic that includes these tags? In terms of tags, we currently have
mom5
with tags onmaster
like2023.11.09
,2023.10.26
. For tags on theaccess-esm1.5
branch, we can have tags that prefix the branch name, likeaccess-esm1.5_2024.05.11
. Would it be possible to have something like (apologies for not knowing the intricacies of SPDwhen(...)
logic):