GH-200 - Consume and troubleshoot workflows - Section 2.2

Diagnose failed workflow runs by reading step logs, run history and annotations to locate the cause.

Diagnose a failed workflow run by inspecting step logs and annotations to locate the failing command or expression. Use re-run jobs to retry failed steps without restarting the entire workflow.

failed runsstep logsannotationsre-run jobs

Practice question for this objective

Free sampleConsume and troubleshoot workflowsmedium

A matrix workflow runs twelve jobs and only two of them failed because of a flaky network call. The engineer has confirmed the code is correct and wants to retry just the two failed jobs while reusing the results of the ten that already passed, keeping runner minutes to a minimum. Which action on the completed run achieves this?

  • AChoose Re-run failed jobs, because it re-executes only the jobs that failed in this run and keeps the results of the jobs that already succeeded. Correct
  • BChoose Re-run all jobs, because it restarts the whole run and only the previously failed jobs are actually re-executed while passing jobs are skipped.
  • CPush an empty commit to the branch, because that triggers a fresh run that GitHub limits to the jobs that did not succeed in the previous run.
  • DCancel the run and start it again from the Actions tab, because cancelling preserves the passing jobs so only the failed ones run when the workflow restarts.
Use Re-run failed jobs to retry only the failed jobs in a completed run while preserving the results of jobs that already succeeded. A completed run offers Re-run failed jobs, which re-executes only the jobs that failed and reuses the recorded results of the jobs that passed, making it the lowest-cost way to recover from a transient failure. Re-run all jobs re-executes the entire matrix, pushing a new commit or restarting the workflow starts a fresh run with no reuse, and there is nothing to cancel on a run that has already finished.

Why A is correct: Re-run failed jobs re-executes only the jobs that did not succeed in the same run while preserving the passing jobs' results, so the two flaky jobs are retried with the least runner usage.

Why B is wrong: Tempting because it reuses the same run, but Re-run all jobs re-executes every job in the run, including the ten that passed, so it consumes far more runner minutes than required.

Why C is wrong: Tempting because a new commit re-triggers the workflow, but it starts an entirely new run that executes all matrix jobs from scratch and does not reuse any earlier passing results.

Why D is wrong: Tempting because it sounds targeted, but the run has already completed so there is nothing to cancel, and restarting the workflow would run the full matrix rather than only the failures.

See more GH-200 practice questions, answers explained.

More in this domain

Back to all Consume and troubleshoot workflows objectives, or the GH-200 cert hub.

Examworthy is not affiliated with or endorsed by GitHub. Original, blueprint-aligned practice material only.