All jobs / DevOps / SRE / cloud / Git
DevOps / SRE / cloud interview question · 3–5 years
p95 latency doubled somewhere in the 60 commits between last week’s release and today’s. Nothing in the diffs jumps out.
How do you find the commit?
The strongest answer
`git bisect` between the good and bad tags with a script that reproduces the measurement — each step halves the range, so about six builds instead of sixty
Why it works
Exactly — bisect turns a linear hunt into a binary search, and a reproducible check makes it mechanical.
What a good answer covers
- Binary search, not linear reading.
- Fix a good and a bad commit.
- Script the reproduction.
- Let bisect drive the checkout.
Answers that fall short
- Close, but not the strongest: Read the sixty diffs carefully, starting with the ones touching the hot path
It can work, but it relies on spotting the cause by eye; the regression may be an innocent-looking config or dependency bump. - Weak: Revert all sixty and re-apply them one at a time until it slows down
That is a linear search with sixty deploys and a lot of risk; bisect does the same job in a fraction of the steps. - Red flag: Ask who pushed last and have them revert their work
Blaming by recency is not diagnosis, and it poisons the team’s willingness to report problems.
Who gets asked this
More Git questions
- What do you standardise, and where do you allow a difference?
- When do you rebase, and when must you never?
- A commit on main broke the build; three teammates have already pulled it. How do you undo it?
- What is a git tag for in a release pipeline?
- Production runs v2.3.0. main has two weeks of unreleased work. A critical bug must ship today. What is your…