Skip to content
Source
Sign inSign up

When something fails

Issues and pull requests / Pull requests

When something on your pull request fails

A check on your pull request is red, merge when ready did not merge, or a part of the page shows an error. You want to know what failed, why, and what to do next.

10 min read

The pull request page says why at the place where it failed.

1. Find what failed

  1. Open the pull request.
  2. In the right column, open the Status tab. It has the merge box and the Checks.
  3. For the agents of the software factory, open the Agents tab.

Tip

A failed check, a failed agent run and a merge when ready that turned off also show in Needs attention on your dashboard. See See what failed while you were away.

2. Go to the section for what you see

You seeRead
A check that failedA check failed
A check that waits, or no checks at allA check waits, or did not run
A failed run with no jobsNo job of a workflow ran
Merge when ready is on, but the pull request did not mergeMerge when ready did not merge
Resolve the conflicts in the merge boxResolve the conflicts
Checking for conflicts or Conflicts not checked in the merge boxThe conflict check did not run
Could not load, or a diff that is too large to compareA part of the page did not load
A message about a walk of more than 100,000 commits in the merge boxThe up-to-date check did not answer
A failed run on the Agents tabAn agent run failed

A check failed

In Checks, the workflows that failed come first. To see the jobs of a workflow, hover over its status icon, or click its row to open it. Each job that did not pass has a line under its name. The line says why the job ended, for example:

  • The job ran past its time limit of 10 minutes.
  • The job stopped with an error:, then the first line of the error. Queued, no runner. means the job never got a runner before its time limit. A job on Ravion whose VM did not start within 12 minutes runs again in a new job first, with at most 3 machines in all for its cell: its error is The job lost its container: no VM took the job's claim within 720 s.
  • The pull request was merged. or Someone with write access cancelled this run., for a cancelled job. See The work that stops at the merge or the close.
  • The job reported 3 findings, such as failed tests or lint errors.
  • No CI minutes left this month., with a link to the Billing page. Billing is on, and the owner of the repository has nothing left: a job of a private repository, or a paid job of a public repository (a medium or large job, or any job after the free public CI of the period is used up). See When nothing is left.

The line shows only the first line of an error, and it hides each word that looks like a token.

  1. Click Log next to the job. The run page opens on the job, with the same reason at the top.
  2. Fix the cause on your branch, then push. The new commit gets new checks.

In a terminal:

src pr checks 7
src run view <run> --log-failed

Note

Without write access, you cannot run a check again. The run says A maintainer can re-run it. Your push starts new checks. A run from a fork waits until a maintainer approves it: see Why your run waits. To run the failed job on your computer, see Reproduce a failing job.

A check waits, or did not run

A job that has not started says why it waits:

  • This job starts when the jobs it needs are done.
  • This job waits for a free container slot. The account or the repository runs as many jobs as its limit allows.
  • This job waits until the next UTC day. Its author has no write access, and used all of their CI container time for today.

None of these is a failure. The job starts by itself.

Sometimes no check ran on your commit, and you cannot start the checks. If the base branch has required checks, Checks then says No checks have run on this commit. A maintainer can start the checks. Under it, each required check that waits shows with its reason. Ask a maintainer to start them.

No job of a workflow ran

Sometimes the forge cannot start a workflow at all. The workflow then shows as a failed run with no jobs. Checks says No job of this workflow ran, for this reason:, then the reason and the fix. The runs list of the repository shows the same run, with No job ran: and the first reason.

The reason saysWhat to do
The plan failed, or the file breaks a rule of the plannerFix the workflow file, then push again.
This workflow file is turned off in the CI settingsAsk an admin to turn it on. Then push again.
The fork of the pull request no longer exists, or its head is not on a branch that its readers can seeOpen a new pull request from a branch that exists, and that its readers can see.
This run would be CI push 4 in a row. A chain of CI pushes stops after 3Push a commit by hand.
The CI run whose job pushed this commit is gonePush again.

Only a push and a pull request record such a run. A run of a hidden workflow that did not start is for admins only.

Merge when ready did not merge

Merge when ready is on, but the pull request did not merge. Read the merge box on the Status tab.

While merge when ready waits, it stays on. The box says what it waits for:

  • Waits for the required check ci/test to pass., with Open the job log. It merges when the check passes. Fix the check, or ask a maintainer to run it again.
  • Waiting:, then the reason, and It retries on its own. For example, GitHub's base branch moved. You do nothing.

When only a person can fix the cause, merge when ready turns off. The box shows Merge when ready turned off, with the reason, the fix and the time:

The causeThe fix
The branch has conflicts with its base branchResolve them. See Resolve the conflicts.
The person who turned it on has no working GitHub connectionThat person connects GitHub for sync in Connected accounts.
The pull request points at LFS objects that are not stored herePush them: git lfs push --all origin.

Then a person who can merge clicks Turn on again. The timeline also says why merge when ready turned off.

The author and the people who can merge read the exact reason. Other people read Merge when ready is waiting. or Merge when ready turned off. A maintainer can turn it on again.

Resolve the conflicts

When the branch conflicts with its base branch, the merge box shows Resolve the conflicts. If you are the author, or you can update the branch, it gives you the commands for your branch:

git fetch origin
git checkout my-branch
git merge origin/main
# Fix the files with conflicts, then commit the merge and push it:
git commit -a --no-edit
git push
  1. Click Copy the commands.
  2. In your clone, run the first three commands. Git stops at the conflicts.
  3. Fix the files that have conflicts.
  4. Run git commit -a --no-edit, then git push.

Everyone else reads that the author or a maintainer resolves them.

Tip

The repository can let an agent do it. When the Resolve merge conflicts step of the Keep green agent is on, the box says The Conflict fixer agent is on. The agent tries to resolve the conflicts by itself when the branch or the base branch changes. A person who can start it now also gets Run the Conflict fixer. Its run shows on the Agents tab.

The conflict check did not run

The merge box shows the answer of a conflict check. The forge runs this check in the background, after each push to the pull request and each move of its base branch. Two rows say that the check has no answer:

  • Checking for conflicts: the check did not run yet on the newest commits of the pull request and its base branch. When the check ends, the page updates by itself, usually within seconds.
  • Conflicts not checked, with the reason Too large to check for conflicts: the pull request is too large for the check, for example with more than 3,000 changed files. The check does not run for it.

Merging checks the whole merge, so a branch with conflicts does not merge. To fix the conflicts, see Resolve the conflicts.

A part of the page did not load

Each part of the page loads on its own. When one part fails, the rest of the page still shows. The part says Could not load, then what it is and the reason, with Retry. Click Retry to load it again.

  • If Checks, the merge box or the agents did not refresh, they keep their last data and say This panel could not refresh:, then the reason. Click Retry.
  • If the jobs of one CI run do not load, Checks still shows the other workflows. The card and the open row of that workflow say Could not load, then the reason. Click Retry.
  • If a line comment does not send, for example because someone pushed, click Reload next to the error. The page loads the new head, and your text stays in the box. Make sure that the line is still right, then send it again.
  • If a maintainer's decision on a held pull request does not save, the error shows above the tabs, so every tab shows it.

The diff is too large

The Files changed tab says that the diff is too large to compare. Line comments are off for the pull request, because its diff is not shown.

  1. To read one commit at a time, open the Commits tab.
  2. To read every change, click Copy the commands in the notice, and run them in your clone. They are like these:
src pr checkout 7
git diff <merge base> HEAD

When the diff of one file does not load, its notice gives the reason.

The up-to-date check did not answer

A branch rule can ask for an up-to-date branch: the head branch must have the newest commit of the base branch. The git servers of the forge check that with git, and they walk the whole history: they have no limit of commits. When they cannot answer, for example because the check took them more than 30 seconds, the pull request cannot merge, and the merge box says:

This pull request can't merge into main yet. The check that the branch is up to date with main needs a walk of more than 100,000 commits. Merge main into it with git on your computer, and push it.

The message names a walk of 100,000 commits, but no such limit stopped the check: it did not answer. Load the page again to run the check again. If the message stays, update the head branch with git: merge the base branch into it and push it:

git fetch origin
git switch feature
git merge origin/main
git push

An agent run failed

A row on the Agents tab says that a run failed. The run says why, and what to do next. See If a run failed. Every cause is in Why a run failed.

Done

Each failure on your pull request says why it happened, and what to do next: in the checks, in the merge box, on the run page and at each part of the page.

From a terminal or an agent

  • GET /api/v1/repos/{owner}/{repo}/ci/runs/{id} (MCP: get_ci_run) gives each job endReason and waitReason.
  • GET /api/v1/repos/{owner}/{repo}/pulls/{n}/checks (MCP: get_pull_request_checks) gives each required check the jobId of its job.
  • See Use the REST API for the fields.