Skip to content

Add CI tests for shared CCPP-physics and MOM6 submodule hash consistency#4594

Draft
Copilot wants to merge 2 commits intodevelopfrom
copilot/add-ci-test-for-hashes
Draft

Add CI tests for shared CCPP-physics and MOM6 submodule hash consistency#4594
Copilot wants to merge 2 commits intodevelopfrom
copilot/add-ci-test-for-hashes

Conversation

Copy link
Contributor

Copilot AI commented Feb 26, 2026

Description

CCPP-physics is pinned in both UFS_Utils (sorc/ufs_utils.fd/ccpp-physics) and ufs-weather-model (via UFSATM at sorc/ufs_model.fd/UFSATM/ccpp/physics). When these diverge, build inconsistencies occur silently. Similarly, GDASApp/SOCA uses MOM6 from ufs-weather-model via a symlink in build.sh; if that relationship breaks, the build fails without a clear CI signal.

Changes

  • dev/ci/scripts/unittests/test_submodule_hashes.py (new): Two pytest tests:

    • test_ccpp_physics_hashes_match — compares CCPP-physics commit hashes between sorc/ufs_utils.fd/ccpp-physics and sorc/ufs_model.fd/UFSATM/ccpp/physics using git ls-tree; fails when they differ
    • test_gdas_mom6_uses_ufs_model_mom6 — verifies sorc/gdas.cd/build.sh symlinks MOM6 from sorc/ufs_model.fd/MOM6-interface/MOM6 and that path is a registered submodule in ufs-weather-model; fails if the symlink target drifts or MOM6 is moved

    Both tests skip gracefully when required submodules are not initialized (e.g., minimal CI checkouts).

  • .github/workflows/ci_unit_tests.yaml: Extends the submodule init step to include ufs_utils.fd, gdas.cd, and the nested ufs_model.fd/UFSATM submodule so the new tests are fully exercised in CI.

Resolves #4593

Type of change

  • Bug fix (fixes something broken)
  • New feature (adds functionality)
  • Maintenance (code refactor, clean-up, new CI test, etc.)

Change characteristics

  • Is this change expected to change outputs? NO
  • Is this a breaking change? NO
  • Does this change require a documentation update? NO
  • Does this change require an update to any of the following submodules? NO

How has this been tested?

  • Tests pass locally with current submodule hashes matching (7395db572d57af1118b9b524e8f8cda4e1cced4c for CCPP-physics in both repos)
  • Failure path verified manually: a mismatched hash string produces a clear assertion failure with both hashes printed

Checklist

  • Any dependent changes have been merged and published
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have documented my code, including function, input, and output descriptions
  • My changes generate no new warnings
  • New and existing tests pass with my changes
  • This change is covered by an existing CI test or a new one has been added
  • Any new scripts have been added to the .github/CODEOWNERS file with owners
  • I have made corresponding changes to the system documentation if necessary

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/ufs-community/ufs-weather-model/git/trees/7b637a8b7d8e96c503b1719affaa647dea7b2631
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (http block)
  • noaa-nws-global-pds.s3.amazonaws.com
    • Triggering command: /usr/bin/python python -m pytest dev/ci/scripts/unittests/ -v --ignore=dev/ci/scripts/unittests/test_setup.py --ignore=dev/ci/scripts/unittests/test_create_experiment.py /opt/pipx_bin/git credential.helpetr (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Add a CI test to verify common MOM6 and CCPP-physics hashes</issue_title>
<issue_description>### What new functionality do you need?

The CCPP-physics submodule exists in both UFS_Utils and ufs-weather-model. We should add a test to check whether that the hash in both modules are identical.

Similarly, the GDASApp and the ufs-weather model both have a MOM6 submodule. The CI test should also verify these are identical.

Acceptance Criteria

  • A new CI test is authored
  • It fails when the submodules differ
  • It passes when they are the same

Suggest a solution (optional)

No response</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add CI test to verify common MOM6 and CCPP-physics hashes Add CI tests for shared CCPP-physics and MOM6 submodule hash consistency Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a CI test to verify common MOM6 and CCPP-physics hashes

2 participants