问题
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:
- 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.
- Updating all the relevant micro-services, for example Package 6 depends on 1.
- 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