A flaky test fails 1 in 10 runs and blocks merges. What do you do with the pipeline?
BeginnerScenarioPipeline Design & Triggers
Answer
Situation read → Pipeline reliability problem with a code root cause.
What I'd do →
- Quantify: search failed runs for the test name (
gh run view --log-failed), tag it. - Quarantine: move it to a separate non-blocking job with
continue-on-error: trueand a tracking issue with an owner and date. - Fix the cause (time, ordering, shared state, network) and move it back.
- Avoid blanket retries in the pipeline; if used, retry only the specific test with the framework's retry and report retries.
Why → Retries hide flakiness; quarantine keeps visibility while unblocking the team.
Interview tip → "Flaky tests are bugs with an owner and a deadline."
More on Pipeline Design & Triggers
You join a team whose single 900-line workflow runs everything on every push to every branch. How do you restructure it?IntermediatePushing to a PR branch runs CI twice (once for push, once for pull_request). How do you fix it?BeginnerProduct wants a "Deploy to staging" button that lets QA pick a version. Design it.BeginnerA nightly security scan should run at 02:00 India time on weekdays and also be runnable on demand. Write it.BeginnerYour team wants preview environments per PR on EKS, destroyed when the PR closes. Design the workflow.AdvancedTwo workflows must run in sequence: CI then a separate deploy workflow owned by another team. How do you link them?Intermediate