L9 - Version Control 1 Flashcards
What are the 4 functionalities a modern version control system supports? Define each…
Change Management: Quickly and reliably get any version of the file.
Branch Management: Diverge and combine work streams as needed in a conflict free way.
Build Management: Script activities to be carried out automatically during the build.
Collaboration: Teams across time zones and location can collaborate simultaneously.
What are the 2 repo organisation types?
Mono-repo
Multi-repo
Define Mono-repo
One giant repository for all microservices. Any commit triggers the production of multiple microservices.
What are the pros and cons of Mono-repo?
- Pros:
- Service code is visible and atomically changeable
- Service code is reusable
- Cons:
- Weak or Strong service ownership model must be chosen
- Knowing what needs to be redeployed is hard
Define Multi-repo
A one repo per service policy. Any commit triggers the production of the associated service.
What are the pros and cons of Multi-repo?
- Pros:
- Strong service ownership model
- Knowing what needs to be (re)deployed is easy.
- Cons:
- Service code is not all visible or atomically changeable
- Service code is not easily reusable
What are the 2 branching models that can be adopted when using Version Control?
Feature based development
Trunk based development
Explain feature based development
Create new branches for each feature that needs to be developed. Branch is merged back to main upon feature completion.
What are the pros and cons of feature based development?
- Pros:
- Easy to build and manage multiple features.
- Control over what is merged back into main branch, and when it’s merged.
- Cons:
- Merge conflicts can be very complex
- Expertise is needed to manage and merge branches
Explain trunk based development
Developers work on a single, main branch. If any feature branch is created, it’s merged into the main within minutes.
What are the pros and cons of trunk based development?
- Pros:
- Avoids merge conflicts
- Main branch is always production ready
- Cons:
- Main branch is in a constant state of churn
- Merge expertise are needed for the few merges that are needed