GH-200 - Consume and troubleshoot workflows (18% of the exam) - 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.

Exam traps in Consume and troubleshoot workflows

Answers that look right on this material and are not. Each one is a distractor from a different question in the GH-200 bank for this domain.

  • The workflow file source rendered beside the run, because the failing line of YAML is highlighted there with the captured error text shown inline next to it.

    Why it is wrong: Tempting because the YAML defines the steps, but the run summary does not annotate the workflow source with runtime errors. The file view shows syntax, not which step failed at execution time.

  • Whether the failed runs consumed more billable minutes than the earlier passing runs, since a rise in usage indicates the step that began failing.

    Why it is wrong: Tempting because usage is visible per run, but billable minutes reflect how long a run executed, not why it failed. A failing run can use fewer minutes than a passing one by stopping early.

  • Choose Re-run all jobs on the run so the whole matrix is regenerated, which guarantees the macos-latest with node 20 combination is rebuilt alongside the eleven that already passed.

    Why it is wrong: Tempting because it certainly reruns the failed job, but it also reruns the eleven passing combinations, wasting minutes and contradicting the requirement to retry only the one failed job.

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