Add repro payu setup check - this should pick up changes to manifests#190
Add repro payu setup check - this should pick up changes to manifests#190
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #190 +/- ##
===========================================
+ Coverage 68.39% 85.38% +16.98%
===========================================
Files 14 22 +8
Lines 829 1300 +471
===========================================
+ Hits 567 1110 +543
+ Misses 262 190 -72 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thinking about this more, it could just check if any Originally I thought it is not a good idea as it'll pick up changes to |
4eea17d to
f16581b
Compare
|
Thanks @jo-basevi for the previous work and suggestions! In this case, empty manifests will not raise an issue. Also test I am not sure if this is what we want. Happy to chat and change it. |
jo-basevi
left a comment
There was a problem hiding this comment.
Thanks for adding this change in!!
Thinking about this more, I am wondering whether this should be two tests:
test_setup_reproduce_manifests
- Uses
payu setup --repro(will need to fix payu failing on empty manifests first...). This will pick up if md5 hashes have changed (so the files are different).
test_setup_unchanged_manifests
- Catches if paths or binhashes have changed using the git diff logic you have added. If the
md5's are the same, it will just need the manifests to be updated withpayu setup. This wouldn't be as large of an issue as the configurations are still using the same files but the initialpayu setupwould take longer as it needs to recalculate all the md5 hashes.
For scheduled tests for tags, only test_setup_reproduce_manifests should run, as if it fails, it will indicate something on NCI has changed.
But for PRs or scheduled tests for branches, both manifest tests should run so the manifests are always kept up to date.
I agree that it is good to split |
499cd8b to
f277c4c
Compare
jo-basevi
left a comment
There was a problem hiding this comment.
Thanks for adding these changes in!
|
It could be good add the new markers to the list of markers in the README.md: |
9c5ab15 to
44d70ff
Compare
|
Thanks @jo-basevi for reminding me of updating readme :) |
jo-basevi
left a comment
There was a problem hiding this comment.
Changes look good! Just a couple very minor comments
jo-basevi
left a comment
There was a problem hiding this comment.
Thanks @Qian-HuiChen, changes look good to me! I've run a couple tests and it seems to run as expected
I'm not able to approve this PR as I opened the PR initially. As there doesn't seem to be a way to change authorship, it might make sense to close this PR and re-open a new PR, which I can then approve?
Qian-HuiChen
left a comment
There was a problem hiding this comment.
Since Jo cannot approve it on her side, I will approve myself haha
|
Turns out my approval cannot allow merging because I pushed the last commit. I re-opened this PR #208. |
This PR adds a "repro_payu_setup" test marker, which selects a test that runs "payu setup" with "--reproduce" flag - This is equivalent to setting the following in
config.yaml:So setup will raise an error if any full hashes in the generated manifests do not match.
Tested this with running
model-config-tests -m repro_payu_setupon a configuration with unchanged manifests, and with a changed restart manifest (removed values from a binhash and md5), the error is:An issue is that Payu raises an error when restart manifests are empty, e.g. ACCESS-OM2:
I wonder if payu could not error here and only error if there was no pre-existing manifest and a new restart manifest was generated?
Related to #9