Current situation
Currently we have the master branch of the cookbooks repo that is deployed to the cumin hosts and is the authoritative source of all the cookbooks that run in production, from the production hosts.
Then the wmcs branch of the repository was created to unblock the development on the WMCS side.
When the wmcs branch of the same repo was created there were already some existing cookbooks in the wmcs/ subtree.
As the development has progressed in the wmcs branch for all things WMCS-related, the original copy of the existing cookbooks in the wmcs/ subtree is not anymore authoritative and in many cases also obsolete having stale copies of the cookbooks that have been updated in the wmcs branch.
Practical issues
- The stale copies of those cookbooks are deployed to the cumin hosts, with the risk of potentially running stale/obsolete code.
- As I'm about to remove the deprecated icinga.Icinga class in favor of the icinga.IcingaHosts one, I found that I would need to update both copies of the wmcs and master branches. Apart the double patch (that is not a big problem ofc), this will also create more conflicts when rebasing the wmcs branch on top of the master one.
- There are currently cookbooks in the master branch that are deployed to the cumin hosts that can't be run from there as they will fail because they are supposed to be run from the local environment of a WMCS SRE.
Proposal
Simplify the distinction of the two branches, removing all stale/obsolete cookbooks in the wmcs/ subtree that are not supposed to be run from production and for which the copy in the wmcs branch is the one authoritative.
The only current exception that I can see is the wmcs/wikireplicas/add_wiki.py cookbook, that AFAIK is run from production.
I see two mutually alternative clear cuts here:
- remove all wmcs/** cookbooks from the master branch and all additional code in wmcs/__init__py leaving just the add_wiki cookbook there.
- move the add_wiki cookbook into the sre/ subtree and remove entirely the wmcs/ subtree from the master branch.
This will effectively remove all stale code, reduce or remove conflicts when rebasing the wmcs branch, make more clear (even more with (2) than (1)) which branch is authoritative for which cookbook, remove the need of unnecessary patches to modify obsolete code that uses old Spicerack features when those are modified/removed.