←Older revision |
Revision as of 07:34, 22 May 2018 |
Line 99: |
Line 99: |
| | '''master''' branch is bug free | | | '''master''' branch is bug free |
| | '''master''' branch in the ''integration repository'' and all referenced ''slave repository'' versions are bug free | | | '''master''' branch in the ''integration repository'' and all referenced ''slave repository'' versions are bug free |
| + | |- |
| + | | integration guy |
| + | | every developer is responsible for merging own changes to '''master''' branch |
| + | | every developer is responsible for merging reference to own changes to ''integration repository'' |
| |} | | |} |
| | | |
Line 115: |
Line 119: |
| | | |
| The advantage of using '''master''' branch for collaborative development is the simplicity of producing daily builds ready for quality checks or publishing to [[Maven]] snapshot repository. Most of the projects do that for '''master''' branch. In the [[MultiGitRepository]] setup each ''slave repository'' gets such infrastructure automatically. Again, these are just temporary builds, not fully correct from the global ''integration repository'' perspective, but for many usages they are good enough: many teams use such temporary bits for manual sanity checks to be sure everything is OK, before they include their work (e.g. id of their repository latest '''master''' commit) into the ''integration repository''. | | The advantage of using '''master''' branch for collaborative development is the simplicity of producing daily builds ready for quality checks or publishing to [[Maven]] snapshot repository. Most of the projects do that for '''master''' branch. In the [[MultiGitRepository]] setup each ''slave repository'' gets such infrastructure automatically. Again, these are just temporary builds, not fully correct from the global ''integration repository'' perspective, but for many usages they are good enough: many teams use such temporary bits for manual sanity checks to be sure everything is OK, before they include their work (e.g. id of their repository latest '''master''' commit) into the ''integration repository''. |
| + | |
| + | ==== Appendix B: Who Shall Integrate it All? ==== |
| + | |
| + | My colleague Stefan wrote: ''The task of integrating the individual repositories into the integration repository on a daily/weekly base is another issue. If the integration tests just work fine, there is no issue to worry about. But if the integration tests fail, who is responsible for fixing the integration?'' |
| + | |
| + | Who's responsible for your pull request to be integrated these days (in a ''single repository'' setup)? You. The same way you shall be responsible for making sure the '''eventually correct''' changes will become part of the truth - e.g. they get integrated into the ''integration repository'' (in the [[MultiGitRepository]] setup). |
| + | |
| + | Such propagation can be automated. There can be an automatic continuous job which brings the most recent '''master''' commit from each ''slave repository'' into the ''integration'' one. Most of the time this works fine, however there are situation when it doesn't and a manual interaction is required: |
| + | * a conflicting behavior between ''slave repositories'' which causes integration tests to fail |
| + | * a global change that needs to be orchestrated among multiple ''slave repositories'' |
| + | |
| + | One idea is to ''name a person to fix the integration issues''. However such ''integration guy'' is going to have quite a hard time. Orchestrating changes coming from different teams that focus only on their own part maybe very challenging. If the teams are constantly submitting more code, moving ahead and potentially increasing incompatibilities, finding commits that work together may become almost impossible. Just like [[LibraryReExportIsNPComplete|finding a configuration of modules to work with others]] is known to be [[NP-Complete]], finding the versions of ''slave repositories'' that work together is [[NP-Complete]] as well. |
| + | |
| + | As horribly as the above sounds, it is no different to ''single repository'' case with many independent branches. When there is a massive parallel development on the branches, making sure the branches can be merged together, is tough task as well. Being an ''integration guy'' responsible for merging branches of teams who work on their own branches and completely ignore the other ones, would be as unwanted position as in the above ''multi integration guy'' case. |
| + | |
| + | Luckily there is a simple and well known solution that we use daily while working on ''single repositories'': every developer (or at least a team) is responsible for ensuring own pull requests get merged into the integration point - e.g. '''master''' branch. Focusing on merging one branch (e.g. single variable) into relatively fixed target eliminates the [[NP-Complete]]ness just like the [[RangeDependenciesAnalysed]] show case does it for the module configuration problem. There is no reason to not use the same roles in the [[MultiGitRepository]] setup. As such: |
| + | |
| + | Every developer should be his own ''integration guy''! It is every developer's responsibility to make sure his changes eventually end up in the ''integration repository''. |