Add git diff to fleximod_test#317
Conversation
If the tags used by git fleximod in the .gitmodules do not match the externals checked in to the various components, then "git diff --exit-code" will fail. In this case, whichever components are triggering the failure should be updated to ensure .gitmodules and the actual externals match.
If the git fleximod test fails in 3.7 due to a python incompatibility, it would be nice to still run the test in 3.x
|
@mnlevy1981 I'm not sure what your intent is here. This test already exists in the github workflows (without using git diff). |
I didn't realize there was already a test in the workflow, but it didn't seem to catch the fact that CTSM's external (FATES) and MOM's external (MOM6) were both out of sync |
|
I think that's what happens in the workflow here, which is what Jim's referring to: CESM/.github/workflows/fleximod_test.yaml Line 22 in d9e01b7 Doing that in a mismatched CTSM checkout I set up gives error code 3. |
@samsrabin In a clean checkout of $ git diff
diff --git a/components/mom b/components/mom
--- a/components/mom
+++ b/components/mom
@@ -1 +1 @@
-Subproject commit dbf39d2acaf1deebc81674e777d9af81d084b10d
+Subproject commit dbf39d2acaf1deebc81674e777d9af81d084b10d-dirtyThis is due to a mismatch in $ cd components/mom/
$ git diff
diff --git a/MOM6 b/MOM6
index 8feb162..acadc6e 160000
--- a/MOM6
+++ b/MOM6
@@ -1 +1 @@
-Subproject commit 8feb16278d3dbeb22e4902257d2dcf6560a49e06
+Subproject commit acadc6eca5808b302c5d5dbb2bece8ea05aaf316
(I'm not sure what happened to the FATES diff I was seeing in a different sandbox, I swear over the weekend I was also seeing differences in |
|
Maybe it didn't detect those because they're both marked as only |
Maybe - @jedwards4b was going to look into it this afternoon... it does sound like an issue in |
This should pass CI, since it will get correct MOM6 external
Description of changes
If the tags used by git fleximod in the
.gitmodulesdo not match the externals checked in to the various components, thengit diff --exit-codewill fail. In this case, whichever components are triggering the failure should be updated to ensure.gitmodulesand the actual externals match.Specific notes
Contributors other than yourself, if any:
Fixes: [Github issue #s] And brief description of each issue.
User interface changes?: No
Testing performed (automated tests and/or manual tests):
I verified that
git diff --exit-codewill return 1 if there are differences in any of the submodules (including differences in submodules of submodules) and 0 if everything is clean; I'm 99% sure this branch will fail the fleximod-test for non-zero return codes.