Youโve learned the concepts. Youโve seen the diagrams. Youโve read about Uber, Shopify, and Google.
Now itโs time to prove your mastery. ๐ฏ
This 12-question quiz covers everything from the basics to advanced strategies. Get 10+ right and youโll earn bragging rights (and a shareable diploma).
๐
Merge Queue Mastery Exam
12 questions. No pressure. Okay, maybe a little pressure.
Test your knowledge and earn your diploma!
Not stored anywhere โ just for your diploma!
Question 1 / 12
Score:0
๐ฏ True or False
A merge queue tests your PR against only the tip of main, ignoring other queued PRs.
False! That's what regular CI does. A merge queue tests your PR against the future state of mainโincluding all PRs ahead of you in the queue. That's the whole point! ๐ฏ
๐ค Pick One
Two PRs pass CI individually, but break main when merged together. This is called:
Semantic conflict! Merge conflicts are caught by git. Semantic conflicts are silent killersโcode changes that are syntactically valid but logically incompatible. ๐ฅ
๐ Complete the Sentence
Speculative checks work by ______ that PRs ahead in the queue will pass.
Assuming! Speculative checks assume PRs ahead will pass and start testing yours in parallel. If that assumption is wrong, your test is invalidated and re-run. Optimism with a safety net! ๐ฒ
๐ฌ Scenario Time
Your CI takes 30 minutes. With a basic queue (no batching, no speculative checks), what's the max throughput?
48 PRs/day! 24 hours ร 60 minutes รท 30 minutes = 48. Sequential processing means one PR at a time. Speculative checks or batching would increase this! ๐ถ
โก What Happens Next?
PR #2 fails in the queue. PR #3 was speculatively tested against [main + #1 + #2]. What happens to PR #3?
Re-tested! PR #3's test is now invalidโit was tested in a world where #2 existed. The queue automatically re-tests #3 with a new base that excludes #2. ๐
๐ฏ True or False
Batching saves CI costs by testing multiple PRs with a single CI run.
True! If you batch 3 PRs together, you run CI once instead of thrice. That's 66% cost savings! The tradeoff: if the batch fails, you need to bisect to find the culprit. ๐ฐ
๐งฉ Match the Feature
Which feature lets frontend and backend PRs merge independently without blocking each other?
Parallel queues! They let independent scopes (frontend, backend, docs) each have their own queue. Changes that don't affect each other don't wait for each other. ๐ค๏ธ
๐ First Things First
What should you fix BEFORE adopting a merge queue?
Flaky tests! A 2% flake rate means 1 in 50 queue runs fails randomly. With batching, flakes eject innocent PRs. Fix flakes firstโaim for <0.5% flake rate. ๐ฒ
๐ข Industry Knowledge
Which company's merge queue (SubmitQueue) uses machine learning to predict change success?
Uber! Their SubmitQueue uses ML to predict which changes are likely to pass, optimizing build scheduling. They went from 52% green to 99% green on their iOS mainline! ๐
๐๏ธ Monorepo Mastery
In a monorepo, a PR touches both /frontend and /backend. With parallel queues, how should it be handled?
Union strategy! The PR enters both queues and must pass in both before merging. This prevents a cross-scope change from breaking either scope while keeping queues mostly independent. ๐
๐ Two-Step Thinking
In two-step CI, what's the purpose of the first step (PR CI)?
Fast feedback! Step 1 (PR CI) runs quick checks to give developers fast feedback. Step 2 (Queue CI) runs the full test suite against the real merge target. Speed + correctness! โก
๐ Final Boss Question
The "Not Rocket Science Rule" that inspired merge queues states:
Correct! Graydon Hoare (Rust's creator) coined this in 2013 when building Bors. It's not rocket science to keep main greenโjust test before you merge. Simple in principle, powerful in practice! ๐