8

Our software is modular and I have about 20 git repos in one project.

If a test fails, it is sometimes hard to find the matching commit since several developers work on these 20 repos.

I know the test worked yesterday and fails reproachable today.

Sometimes I use git-bisec, but this works only for one git repo.

Often changes in two git repos make a test fail.

I could write a dirty script which loops over my N git repos myself, but before doing so, I would like to know how experts would solve this.

I use Python, Django and pytest, but AFAIK this does not matter for this question.

guettli
  • 25,042
  • 81
  • 346
  • 663
  • Possible duplicate of http://stackoverflow.com/questions/9711592/repo-bisect-for-debugging-android – Phillip Dec 12 '16 at 11:43
  • 4
    @Phillip's link looks golden for this, but let me just say "this is why you use submodules. this is almost _the_ point of submodules: record which commits go together to build a project from multiple bases". If you'd used submodules, bisect would work perfectly.". – jthill Dec 12 '16 at 14:54
  • Try to narrow the search manually: find moment when complex application was OK, and then it got broken. Is it possible to make list of commits for the whole in one line and go thought it? – Eugene Lisitsky Dec 13 '16 at 08:34
  • @jthill up to now we use not git submodules. I think the problem can be solved without them, too. Maybe a bit harder, but not impossible. – guettli Dec 13 '16 at 15:39
  • @jthill I agree that submodules are a good idea, but I don’t think I could convince anybody else and projects big enough to need them are also usually big enough to have multiple devs. – Daniel H Dec 15 '16 at 00:08
  • Do you use a single build to deploy your whole project? Can you please describe the directory structure. I might be able to help since I have worked for quite some time on git-bisect. – Pranit Bauva Dec 17 '16 at 11:05
  • We have all our own code in ~/src in a python virtual environment. Third party code gets installed via pip. – guettli Dec 18 '16 at 21:22

2 Answers2

3

I personally prefer to use repo tool to manage complex projects. Put those 20 repos in manifest.xml and each time when build starts create patch manifest if build fails do repo diff manifests to see what was changed and where.

guettli
  • 25,042
  • 81
  • 346
  • 663
Filip Stefanov
  • 800
  • 3
  • 10
  • 18
3

There is category of QA tool for "reverse dependency" CI builds. So your higher level projects get rebuilt every time a lower level change is made. At scale it can be resource intensive.

The entire class of problem is removed if you stop dealing with repo-to-repo relationships and start following version release methodology for the subcomponents. Then you can track the versions of lower-level dependencies and know when you go to upgrade that it broke. Your CI could build against several versions of dependencies if you wanted to systematize it.

Git submodules accomplish that tracking for individual commits, so you again get to decide when to incorporate changes from lower levels. (Notably, that can also be used like released versions if you only ever update to tagged release commits.)

Joe Atzberger
  • 3,079
  • 1
  • 18
  • 16
  • Which tool of this category of QA tool for "reverse dependency" CI builds do you use? – guettli Dec 15 '16 at 20:08
  • My current shop previously did it with Jenkins scripting on our old CI server. – Joe Atzberger Dec 16 '16 at 08:02
  • We already use Jenkins. It pulls the N repos from us (all from master (agile)) and tries to test the particular project. A project is very small, mostly configuration, only few coding lines. What tool do you use now? – guettli Dec 16 '16 at 10:25
  • We switched to Travis CI with more formal SemVer releases. – Joe Atzberger Dec 19 '16 at 08:54