NCAR / ccpp-framework

Common Community Physics Package (CCPP)
http://www.dtcenter.org/community-code/common-community-physics-package-ccpp/
Other
26 stars 64 forks source link

Rethink CCPP framework development cycle and branch structure #553

Open peverwhee opened 8 months ago

peverwhee commented 8 months ago

Summary

Now that feature/capgen has been merged into main, we have the opportunity (and perhaps necessity) to change the development cycle to:

  1. Speed up the development process;
  2. Ensure changes do not break UFS or CAM-SIMA (or any future host model who wants to use the framework and is willing to put in the resources to consistently test it); and
  3. Make the framework more accessible to other potential partners/users.

NCAR Wish List

  1. Tags for PRs merged into main and proposed development branch; this ensures that older versions of CAM-SIMA will be stable and new updates can be fully tested before being integrated.
  2. Some way to get quick bug fixes into the framework’s (proposed) development branch if necessary (possibly skirting the full UFS or CAM-SIMA testing cycle on occasion if deemed necessary)
  3. No long-lived branches dedicated to specific host applications, due to concerns that this may cause the framework to dis-unify as hosts add features that work for that particular host model but not the other CCPP-enabled host models.

Proposal

“Regular” workflow:

  1. New framework feature developed (“feature/new” in diagram)
  2. feature/new merged into framework development branch (passed minimal testing)
  3. Tag (ccpp_dev_tag_3 in diagram) made for new feature on development branch
  4. Tag tested in host model development branch
  5. Testing identified bug; bugfix branch created for CCPP-framework
  6. Bugfix merged into framework development branch (passed minimal testing)
  7. Tag (ccpp_dev_tag_n in diagram) made for bugfix
  8. Bugfix tag tested in host model development branch
  9. Host model A testing passed
  10. Host model A can use "ccpp_dev_tag_n"
  11. Framework development merged into main after complete testing suite performed - NCAR and UFS testing (merged at regular cadence)
  12. Framework release tag made
  13. Host model release branch made
  14. End result: host model release branch points to framework release tag

proposed_framework_development_workflow

climbfuji commented 7 months ago

I like this. The development branch should be named develop following standard practices.

dustinswales commented 7 months ago

This all seems sensible to me, but isn't the governance of development outside of "main" none of our business?

peverwhee commented 7 months ago

After further discussion at the framework meeting (see Meeting Minutes for details), we have three options:

In an effort to keep track of people's ideas, I've started a pro/con chart here. I have populated it with themes and ideas I pulled from our meeting, but feel free to edit with your thoughts. I will post a screenshot of the final list here in this issue when we're "done" for record-keeping; here's what it looks like now:

image

mkavulich commented 7 months ago

@peverwhee Thanks again for listing this all out and organizing the pros and cons. After some time to digest the topic, I've come up with some (mildly rambly) thoughts:

Off the bat, I am leaning towards solution 2 (separate branches for each host model). Specifically, a modified proposition that would use forked repositories rather than simple branches within the main repository: this would bring ccpp-framework more in line with how ccpp-physics is handled, and would allow CESM/SIMA and other individual projects to work at their own development pace and only take contributions from the main branch/repository when they are ready.

My reason for wanting forks is that this will allow for issues and PRs specific to each dycore to be appropriately separated so that A. Issues and PRs will be seen more easily by the people most able to fix them, and B. The main repository will remain less cluttered and easier to maintain.

In order for this to actually work, we would need buy-in from all groups maintaining forks that

  1. They will follow all CCPP standards in their fork as defined in the CCPP Technical Documentation
  2. They will run all tests from the main branch on their own fork on a regular basis (preferably these would pass for all changes) and
  3. They will offer in-kind help to ccpp-framework code managers for any trouble merging changes to the main branch, and make reasonable efforts to adopt any requested changes from ccpp-framework code managers.

As a counterpoint to the testing requirements from the main branch, groups with forks would also have the right to insist on any tests they require being run on all development to the main branch. In fact, the more automated testing at more steps, the better!

As for what kind of cadence to merge changes back into the main repository, I don't really know what makes sense.

peverwhee commented 6 months ago

Updated pro/con list with contributions from @mkavulich

image

nusbaume commented 6 months ago

Hi @mkavulich et al., after discussion from the group here at NCAR/CGD, we just wanted to share our overall thoughts:

Given this, assuming there is no way to significantly speed up testing, we are leaning towards having a shared development branch. Of course we are always happy to discuss this further if folks still have concerns. Thanks!