Version Control Flashcards

1
Q

What is a Monorepo?

A

A repository model where one giant repo contains all microservices. Any commit triggers the production of multiple microservices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a Multirepo?

A

A repository model where each service has its own repo. Any commit triggers the production of a single service.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the purpose of branching in version control?

A

Branching allows developers to develop and test new ideas away from the main system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is Feature-Based Development?

A

A branching model where developers create new branches based on project needs. Developers may use long-lived feature branches that are merged back into the main branch weeks or months later.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Trunk-Based Development?

A

A branching model where developers work on a single main branch. Developers may create short-lived feature branches, but they are merged back after a few minutes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Why should commit tests be run locally before committing code?

A

To refresh the local copy of the project and prevent breaking the build, which slows down other developers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Why should developers wait for commit tests to complete?

A

Monitoring commit test progress ensures that failures can be resolved quickly, as tests run automatically in script files with thousands of tests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Why should developers avoid committing on a broken build?

A

New changes added to a broken build can cause compounding failures, making debugging much more difficult.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Why should developers never go home on a broken build?

A

The developer who introduced the issue is likely the only one who knows how to fix it quickly. A broken build can prevent other developers from working.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Why is it common practice to commit at the start of the day rather than the end?

A

So that if a build breaks, the developer is available to fix it instead of leaving it for others.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does it mean to be ‘prepared to revert’ in version control?

A

Like a ‘go around’ in aviation, a revert means rolling back to a safe build if changes fail, lowering the cost of change.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Why should developers avoid commenting out tests?

A

Commenting out tests is bad practice as it prevents future bugs from being detected.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does ‘taking responsibility for breakages’ mean in version control?

A

If a commit breaks tests (even those written by others), the developer who committed must resolve the issue.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the three benefits of a version control system according to D. Farley?

A
  1. Step back to safety
  2. Share changes easily
  3. Store changes somewhere safe
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the three models of version control?

A
  1. Mono-repo - everything in one big repository
  2. Multi-repo - independent things in separate repositories
  3. Multi-repo’ - interdependent things in separate repositories
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Why does a mono-repo provide the three benefits of version control?

A

Because it allows:
1. Stepping back to safety - by stepping back all components
2. Sharing changes easily - by changing any component
3. Storing changes safely - by saving all components together

17
Q

Why might a multi-repo not provide the three benefits of version control?

A

Because communication between components and version specifications are not stored anywhere.

18
Q

What are two solutions to the multi-repo problem?

A
  1. Use fixed, well-understood APIs
  2. Use flexible, backwards/forwards compatible APIs
19
Q

How do the solutions to the multi-repo problem restore the three benefits of version control?

A
  1. Step back to safety - by stepping back any component
  2. Share changes easily - by coordinating updates (though not easy)
  3. Store changes safely - by storing components separately
20
Q

Why is ‘multi-repo’’ considered the worst of all worlds?

A

Because components cannot be developed or deployed independently.