>DevOps Interview KB

You inherit a legacy CI/CD pipeline with zero documentation, and the person who built it left the company months ago. How do you approach understanding it and safely making your first change?

IntermediateScenarioCI/CD8 min read

Short Answer

Reconstruct understanding from evidence before touching anything — read the actual pipeline configuration and its git history (not just the current state, but how it evolved and why), trace what it actually depends on and produces, and build a mental (or written) model of its behavior — then make the first real change as small and reversible as possible, specifically chosen to validate your understanding rather than to accomplish something ambitious, so a wrong assumption surfaces cheaply instead of expensively.

Detailed Explanation

The core risk with an undocumented legacy system isn't that it's hard to read — it's that acting on an incomplete or wrong mental model feels the same as acting on a correct one, right up until something breaks in a way that's hard to trace back to the actual cause. The methodology is about closing that gap before it costs something:

Understand before changing. Read the pipeline configuration itself thoroughly, but also its git history — commit messages and the sequence of changes over time often reveal why something exists (a workaround for a specific past incident, a compatibility shim for a system that's since been replaced) that the current-state configuration alone doesn't explain. Look for anything that seems unnecessarily complex or oddly specific; that's frequently exactly where the undocumented tribal knowledge lives, and removing or "simplifying" it without understanding why it's there is the single most common way to reintroduce a previously-fixed problem.

Map actual dependencies and outputs, not assumed ones — what triggers this pipeline, what systems/credentials/artifacts does it actually touch, what consumes its output. For a genuinely undocumented system, the safest way to confirm this is empirically (checking logs of recent real runs, checking what actually gets deployed/notified/written) rather than trusting comments or naming, both of which can be stale.

Talk to anyone with adjacent context, even if nobody has full context — someone downstream who consumes what this pipeline produces, or someone who was around (even peripherally) when it was built, often has fragments of the picture that add up to more than any single source.

Make the first change small, reversible, and diagnostic rather than ambitious. Resist the urge to make the "real" change you actually need right away. Instead, pick something low-risk that tests your understanding — a small, easily-revertible tweak, or even just adding logging/observability to confirm the pipeline behaves the way your reconstructed model predicts — before attempting anything with real consequences if the model turns out to be wrong. This turns "was my understanding correct?" into a cheap, fast feedback loop instead of discovering the answer via an incident.

Document as you go, not as a separate later task — the understanding built during this process is exactly the documentation the next person (possibly future-you) will need, and it's far more accurate captured immediately than reconstructed again from memory later.

Interview Follow-Up Questions

  • How would you decide whether to gradually refactor this legacy pipeline versus rewriting it from scratch?
  • What would you do if you found a piece of the pipeline that seems actively dangerous (e.g. overly broad credentials) but nobody can explain why it's configured that way?
  • How do you balance the time investment in fully understanding a legacy system against the pressure to just make the requested change quickly?

Key Takeaways

  • Treat understanding-before-changing as the actual task, not an obstacle delaying the "real" work — acting on a wrong mental model is the main risk with undocumented legacy systems.
  • Git history often explains why something odd exists better than the current-state configuration alone; oddly specific complexity is frequently load-bearing tribal knowledge.
  • Confirm dependencies and outputs empirically (real logs, real runs) rather than trusting comments, naming, or assumptions, which can be stale.
  • Make the first change small and diagnostic to cheaply validate your mental model before attempting anything higher-risk, and document what you learn immediately.

References

Last updated August 21, 2026 · Last reviewed August 21, 2026