{"record":{"id":"dcbc425155c053aa","repo":"denoland/deno","slug":"could-not-find-a-artifact-for-pr-pr-number","errorCode":null,"errorMessage":"Could not find a \"{}\" artifact for PR #{pr_number}.\nAvailable artifacts may have expired or CI may not have completed.\nOnly release builds on linux-x86_64 and debug builds are typically available for PRs.","messagePattern":"Could not find a \"(.+?)\" artifact for PR #(.+?)\\.\nAvailable artifacts may have expired or CI may not have completed\\.\nOnly release builds on linux-x86_64 and debug builds are typically available for PRs\\.","errorType":"exception","errorClass":"AnyError","httpStatus":null,"severity":"error","filePath":"cli/tools/upgrade.rs","lineNumber":760,"sourceCode":"        .context(\"failed to run `gh run download`\")?;\n\n      if dl_result.status.success() {\n        log::info!(\n          \"Downloaded artifact \\\"{}\\\" from run {}\",\n          colors::green(name),\n          run_id\n        );\n        downloaded = true;\n        break;\n      }\n    }\n    if downloaded {\n      break;\n    }\n  }\n\n  if !downloaded {\n    bail!(\n      \"Could not find a \\\"{}\\\" artifact for PR #{pr_number}.\\n\\\n       Available artifacts may have expired or CI may not have completed.\\n\\\n       Only release builds on linux-x86_64 and debug builds are typically available for PRs.\",\n      artifact_name\n    );\n  }\n\n  // Find the downloaded binary\n  let exe_name = if cfg!(windows) { \"deno.exe\" } else { \"deno\" };\n  let new_exe_path = download_dir.join(exe_name);\n\n  if !new_exe_path.exists() {\n    bail!(\n      \"Downloaded artifact does not contain '{}'. Contents: {:?}\",\n      exe_name,\n      fs::read_dir(download_dir)?\n        .filter_map(|e| e.ok())\n        .map(|e| e.file_name().to_string_lossy().to_string())","sourceCodeStart":742,"sourceCodeEnd":778,"githubUrl":"https://github.com/denoland/deno/blob/9ad36f7a2cce60488e6ec52283efb32efddaf93a/cli/tools/upgrade.rs#L742-L778","documentation":"Deno found CI runs for the PR but none of them contained an artifact named like `release-<os>-<arch>-deno` (or the debug variant) to download. Artifact names encode platform and build type, and PR CI only publishes a limited set, so on most platforms the wanted artifact simply is never produced. Artifacts also expire after a retention period.","triggerScenarios":"`deno upgrade --pr <n>` on any platform other than linux-x86_64 for release artifacts (message explicitly says only linux-x86_64 release and debug builds are typically available); CI still in progress so artifacts are not uploaded yet; the run's artifacts expired (default GitHub retention).","commonSituations":"Trying to install a PR build on macOS or Windows; coming back to an old PR whose artifacts have expired; racing a CI run that has not reached the artifact upload step.","solutions":["On macOS/Windows/aarch64, install the debug artifact instead: pass the flag selecting the debug build (e.g. `--pr <n>` with the debug/`--cached` debug option your Deno version exposes) or check the run's artifact list.","Wait until CI completes fully (artifact upload is a late step), then retry.","If artifacts expired, build the PR branch from source or ask for a re-run to regenerate them.","Verify what exists: `gh run view <run-id> --repo denoland/deno` and inspect the artifacts section."],"exampleFix":"# before: requesting a release artifact that PRs never publish for your OS\ndeno upgrade --pr 12345\n\n# after: use the debug artifact path on non-linux-x86_64\ndeno upgrade --pr 12345 --debug  # or build from source: git checkout <pr-branch> && cargo build --bin deno","handlingStrategy":"retry","validationCode":"# confirm the artifact exists before upgrading\nrun_id=$(gh run list --repo denoland/deno --branch pr-branch --limit 1 -q '.[].databaseId')\ngh api \"repos/denoland/deno/actions/runs/$run_id/artifacts\" --jq '.artifacts[].name' | grep -q \"$(echo release-$(uname -s | tr A-Z a-z)-$(uname -m)-deno)\" || echo \"artifact absent — wait or use debug/build from source\"","typeGuard":null,"tryCatchPattern":"deno upgrade --pr 12345 2>err.log || { grep -q 'Could not find a' err.log && { sleep 300; deno upgrade --pr 12345; }; }","preventionTips":["On non-linux-x86_64 platforms, plan for the debug artifact or a source build.","Check the run's artifact list before invoking the upgrade.","Install from recent PRs only — artifacts expire under GitHub retention."],"tags":["upgrade","pr-build","ci-artifacts","github-actions","expiration"],"backgroundTag":"ci-artifact-not-found","analyzedSha":"9ad36f7a2cce60488e6ec52283efb32efddaf93a","analyzedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}