How To Handle Shared Library Version Bump In a Multi Repo?

有些话、适合烂在心里 提交于 2020-07-23 06:35:15

问题


Little context - today I have a monolith application that I am planning to split into micro-services due to it's growth and the need to partial re-deployments.

I'm designing a development process where I have a number micro-services in a multi repo environment (All written in python).

  • There is a one "Foundation" repository that stores ~30 different packages of shared code.
  • Each micro-service is stored in a different repo.
  • The plan to share the code is using a package manager ("private" PyPi) where each package manages it's semantic version and on change it's packed and published.

An example of the packages and dependencies:

"Foundation":
Package 1
Package 2 --> 1
Package 3 --> 1,2
Package 4

"Micro-service 1"
Package 5
Package 6 --> 5,1,3

"Micro-service 2"
Package 7 --> 4

I'm trying to understand how to handle the flow where Package 1 introduces new change (let's say - feature change that causes a minor version bump) How I should keep up with changing all the depended libraries ? considering:

  1. Package 3 depends on 1 directly and indirectly - think i want to avoid case where they have different versions - it will cause a problem in the deployment.
  2. Updating all the relevant micro-services, for example Package 6 depends on 1.
  3. Every dependent package may introduce different version bump, some of them may have only patch level change due to Package 1 minor change.

It seems that in a fresh development process where there are a lot of changes it will be a nightmare to keep up updating everything I've seen some different scripts or tools like Lerna for npm that should help with that - but still don't understand what's the best strategy for fresh development projects

来源:https://stackoverflow.com/questions/62726208/how-to-handle-shared-library-version-bump-in-a-multi-repo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!