denoland/deno · error · AnyError

No CI runs found for PR #{pr_number}. The PR may not have be

Error message

No CI runs found for PR #{pr_number}. The PR may not have been pushed yet, CI hasn't started, or CI hasn't run on the latest commit yet.

What it means

To find a downloadable binary, Deno lists GitHub Actions runs for the PR's head SHA and its branch and collects run IDs; this error means both queries returned nothing. In other words the upgrade logic has no CI run to inspect for artifacts. It is usually a timing issue: the PR was just pushed or its latest commit has not started CI yet.

Source

Thrown at cli/tools/upgrade.rs:708

        "databaseId,headSha",
        "-q",
        &jq_filter,
      ])
      .output()
      .context("failed to query CI runs by branch")?;

    if branch_runs.status.success() {
      let ids = String::from_utf8_lossy(&branch_runs.stdout);
      for id in ids.trim().lines() {
        if !id.is_empty() {
          all_run_ids.push(id.to_string());
        }
      }
    }
  }

  if all_run_ids.is_empty() {
    bail!(
      "No CI runs found for PR #{pr_number}. \
       The PR may not have been pushed yet, CI hasn't started, \
       or CI hasn't run on the latest commit yet."
    );
  }

  // Try each run to find one with our artifact
  let temp_dir =
    tempfile::TempDir::new().context("failed to create temporary directory")?;
  let download_dir = temp_dir.path();

  let mut downloaded = false;
  for run_id in &all_run_ids {
    // Try release build first, then debug
    for name in [&artifact_name, &debug_artifact_name] {
      log::info!(
        "{}",
        colors::gray(format!("Trying run {run_id}, artifact \"{name}\"..."))

View on GitHub (pinned to 9ad36f7a2c)

Solutions

  1. Wait for CI to start and finish on the PR's latest commit, then re-run `deno upgrade --pr <n>`.
  2. Open the PR page and confirm checks are actually running on the newest commit (not a stale SHA).
  3. If CI was skipped or needs approval (fork PRs), trigger/approve the workflow first.
  4. As a workaround, build the PR branch locally or install from a release/branch that already has artifacts.
Defensive patterns

Strategy: retry

Validate before calling

sha=$(gh pr view 12345 --repo denoland/deno --json headRefOid -q .headRefOid)
until [ -n "$(gh run list --repo denoland/deno --commit "$sha" --limit 1 -q '.[].databaseId' 2>/dev/null)" ]; do
  echo "waiting for CI…"; sleep 60
end
deno upgrade --pr 12345

Try / catch

for i in 1 2 3; do deno upgrade --pr 12345 && break || sleep 120; done

Prevention

When it happens

Trigger: `deno upgrade --pr <n>` immediately after a PR is opened or after a new commit is pushed, before any workflow starts; PRs from forks without the required workflows; workflows disabled or skipped for the head commit; all_run_ids left empty at cli/tools/upgrade.rs:708.

Common situations: Impatiently upgrading right after a maintainer pushes a fix; PRs opened from forks where CI must be approved first; GitHub incidents delaying workflow startup; draft PRs with skipped builds.

Related errors


AI-assisted analysis of denoland/deno@9ad36f7a2c (2026-08-20). Data as JSON: /api/errors/ff3a3611a7a15b50. Report an issue: GitHub.