linera-io/linera-protocol · error · anyhow
No PR jobs found!
Error message
No PR jobs found!
What it means
Raised by PerformanceSummary::init when GitHub's latest_jobs returns zero jobs for the PR branch with event type 'pull_request'. The runtime comparison needs both sides, so init bails. The same tracked-workflow filter is applied, so name mismatches or workflows that never ran on the PR also yield an empty result.
Source
Thrown at linera-summary/src/performance_summary.rs:56
github.context().base_branch(),
"push",
&workflows_handler,
&workflows,
))
.await?;
if base_jobs.is_empty() {
bail!("No base jobs found!");
}
let pr_jobs = Box::pin(github.latest_jobs(
github.context().pr_branch(),
"pull_request",
&workflows_handler,
&workflows,
))
.await?;
if pr_jobs.is_empty() {
bail!("No PR jobs found!");
}
Ok(Self {
github,
ci_runtime_comparison: CiRuntimeComparison::from_jobs(base_jobs, pr_jobs)?,
})
}
fn format_comment_body(&self) -> String {
let commit_hash = self.github.context().pr_commit_hash();
let short_commit_hash = &commit_hash[..7];
let commit_url = format!(
"https://github.com/{}/{}/commit/{}",
self.github.context().repository().owner(),
self.github.context().repository().name(),
commit_hash
);
View on GitHub (pinned to 6c226ddcb3)
Solutions
- Confirm the PR has at least one completed pull_request-event run of the tracked workflows
- Check the workflows are not skipped by 'paths:'/'branches:' filters or fork-PR restrictions
- Verify the tool is running in a PR context (event name pull_request) with a valid pr_branch()
- Re-run the CI workflows on the PR, then retry the tool
Defensive patterns
Strategy: validation
Validate before calling
// Before init: require a pull_request context and at least one completed PR run.
if std::env::var("GITHUB_EVENT_NAME").ok().as_deref() != Some("pull_request") {
anyhow::bail!("performance summary must run in a pull_request event");
} Try / catch
if let Err(e) = PerformanceSummary::init(github, tracked).await {
if e.to_string().contains("No PR jobs found!") {
// CI has not produced results yet: warn and exit non-fatally
}
} Prevention
- Only run the summary after the PR's pull_request workflows finish (e.g. as a dependent CI job)
- Watch for fork PRs and path filters that silently skip the tracked workflows
- Treat a missing PR side as 'not ready yet' rather than a hard failure
When it happens
Trigger: Calling PerformanceSummary::init when latest_jobs(pr_branch, "pull_request", ...) returns an empty Vec: the PR has not yet triggered CI (runs pending or skipped), the PR comes from a fork where pull_request workflows don't run, workflow path/filters skipped the tracked workflows, or the tool runs outside a PR context so pr_branch() is wrong.
Common situations: Running the summary tool immediately after opening a PR before any pull_request-triggered run finishes; PRs from forks with restricted workflow triggers; running the tool on a branch that is not an open PR; workflow 'paths:' filters excluding the changed files.
Related errors
- No base jobs found!
- GITHUB_REPOSITORY is not set! This must be run from within C
- GITHUB_PR_NUMBER is not set! This must be run from within CI
- GITHUB_PR_COMMIT_HASH is not set! This must be run from with
- GITHUB_PR_BRANCH is not set! This must be run from within CI
AI-assisted analysis of linera-io/linera-protocol@6c226ddcb3 (2026-08-22).
Data as JSON: /api/errors/ff6885cd0e78b5e2.
Report an issue: GitHub.