How has the mono-repository changed the lives of Kaspersky Lab developers?

Some time ago, Kaspersky Lab decided to move its development projects to a mono-repository with a common infrastructure. We decided to share our experience and tell what problems the developers face in the chosen approach, and how we learned to solve them.





Why did we move to a mono-repository?

ยซ ยป . . (, Perforce, Git, TFS ). , , . 





, , . , , , .





, . , git- trunk-based development.





, , Monorepo.





Monorepo?

โ€” 50 . 350 -. โ€” 150. , Monorepo.





Monorepo โ€” :





  • Asgard, 75 7000 250 ;





  • Hive, 13 8000 ;





  • AIR;





  • Dashboard.





, Azure DevOps .





bazel .





?

-, . , .   . 2,5 .





โ€” . โ€” 150.





?

, , . , โ€” . , - , , .





, ?

, , . , .





Pull request validation builds.  Vertical - duration of validation builds, horizontal - time.  Successful builds are marked in green, unsuccessful ones in red, canceled ones in gray
-. โ€” , โ€” . , โ€” , โ€”

, -. , , , , -, .





, -, , - master. , , . , .





Scheduled validation build launches.  Vertical - duration of validation builds, horizontal - time.  Successful builds are marked in green, unsuccessful ones in red
. โ€” , โ€” . , โ€”

, โ€” ยซ ยป Monorepo. -, : - , , . -, , , - , . , : โ€” , . , โ€” .





?

master' . , . , , - master' โ€” , - .





Statistics of the distribution of build crashes according to the schedule by subsystems

,  - , . , , .





2019 , 2021 55.31% 81.1%. , -.





 The share of successful builds on schedule in October 2019 was 55.31%
2019 55.31%
The share of successful builds according to the schedule in May 2021 reached 81.1%
2021 81.1%

, - ?

, , , , . Thor โ€” -.





Thor โ€” , (, - ). Thor , , - , , . , , . , , Thor .





An example of a developer pull request in which the validation build is paused
- ,

Thor โ€” , (, ,  , ). - , . - Thor , , - , , . . , 69% , , .





An example of a message about restarting a build

, Thor . - , . .





, Thor , , -. -, , . , .





Sample pull request error message
-

, !

expired-. 24 : , - 24 , . - , , . .





-, . .





flaky-. flaky, , . flaky-, . , , flaky , .





Example of tests marked as flaky
, flaky

flaky , . - , , flaky. , flaky, 4% .





-, . , , , -, -. , - .





Pull request timeline
-

?

. . - .





  .       89%
. 89%

, -, , . , - , - . -, , , . , -, , .





, , .





Monorepo








All Articles