Interview Prep/DevOps Fundamentals/Branching, versioning & releases

What is a pull request, and what makes a good code review?

BeginnerConceptBranching, versioning & releases
Answer

In one line: A pull request (merge request in GitLab) is a request to merge changes from one branch into another, where teammates review the code and CI checks run before it's accepted.

What happens in a PR:

  1. The author pushes a branch and opens a PR with a description.
  2. CI runs automatically: build, tests, scans.
  3. Reviewers comment, ask questions and approve or request changes.
  4. The author updates the code.
  5. Once checks pass and approvals are given, the PR is merged (merge, squash or rebase).

What makes a good PR (author side):

  • Small — ideally a few hundred lines at most; big PRs get shallow reviews.
  • Clear description — what changed, why, how it was tested, screenshots or terraform plan output if relevant.
  • One purpose — don't mix a refactor, a feature and a dependency upgrade.
  • Linked ticket for context.

What makes a good review (reviewer side):

  • Check correctness, security, readability, tests, and operational impact (logging, config, rollback).
  • For infrastructure PRs: read the terraform plan — what will be created, changed or destroyed?
  • Be kind and specific: "This query runs inside a loop — could we fetch all rows once?" rather than "this is bad".
  • Separate must-fix issues from optional suggestions ("nit:").
  • Review quickly — a PR waiting two days slows the whole team.

Automation that helps:

  • Branch protection: required reviews and passing checks.
  • CODEOWNERS to request the right reviewers automatically.
  • Linters and formatters, so humans don't argue about style.

Tip for interviews: mention small PRs, fast reviews and reviewing the Terraform plan for infra changes.

All DevOps Fundamentals questions

More on Branching, versioning & releases