Update schema to support multi-target spack.yaml#41
Merged
Conversation
…f `definitions` is defined
… == "$ROOT_SPEC"`, updated case
jo-basevi
previously approved these changes
Jan 20, 2025
Collaborator
jo-basevi
left a comment
There was a problem hiding this comment.
Looks good to me! Now have learnt how to do conditionals in a schema :)
jo-basevi
approved these changes
Jan 20, 2025
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References ACCESS-NRI/model-deployment-template#15
To diff this schema, do
diff -- au.org.access-nri/model/spack/environment/deployment/1-0-3.json au.org.access-nri/model/spack/environment/deployment/1-0-4.jsonsince it is a new file.Background
This PR updates the schema that contains ACCESS-NRI-flavoured restrictions on
spack.yaml. The changes are as follows:spack.specs[]to allow"$ROOT_SPEC"as a valid valuespack.definitionsto require definitions forROOT_PACKAGE/ROOT_SPEConly ifspack.specscontains$ROOT_SPECAlso had some other changes:
1-0-3.json: Update$idto be correctly referencing itselfCHANGELOG.mdTesting
Tested this schema against https://github.com/ACCESS-NRI/ACCESS-OM2/blob/multi-target-spack-yaml-format/spack.yaml, specifically:
$ROOT_SPECexists inspack.specsbutROOT_SPEC/ROOT_PACKAGEdoesn't (expected failure)$ROOT_SPECexists inspack.specsandROOT_SPEC/ROOT_PACKAGEboth exist (expected success)$ROOT_SPECdoesn't exist inspack.specsandROOT_SPEC/ROOT_PACKAGEdoesn't (expected success)$ROOT_SPECdoesn't exist inspack.specsbutROOT_SPEC/ROOT_PACKAGEboth exist (expected success)Can be tested via
ajv --strict=true -s au.org.access-nri/model/spack/environment/deployment/1-0-4.json -d ../ACCESS-OM2/spack.yaml