linera-io/linera-protocol · error · anyhow
No base jobs found!
Error message
No base jobs found!
What it means
Raised by PerformanceSummary::init in the linera-summary CI tooling when GitHub's latest_jobs call returns zero jobs for the base branch with event type 'push'. The tool builds a CI runtime comparison between PR and base branch, so it aborts without a baseline. Note that the tracked-workflow filter is applied before jobs are fetched, so a workflow-name mismatch also produces zero jobs.
Source
Thrown at linera-summary/src/performance_summary.rs:45
/// runtime comparison.
pub async fn init(github: Github, tracked_workflows: HashSet<String>) -> Result<Self> {
let workflows_handler = github.workflows_handler();
let workflows = github
.workflows(&workflows_handler)
.await?
.into_iter()
.filter(|workflow| tracked_workflows.contains(&workflow.name))
.collect::<Vec<_>>();
let base_jobs = Box::pin(github.latest_jobs(
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)?,
})
}View on GitHub (pinned to 6c226ddcb3)
Solutions
- Verify each tracked workflow name matches the 'name:' field in .github/workflows files exactly (case-sensitive)
- Ensure the base branch has at least one completed run of those workflows triggered by a push event
- Check the base branch name the tool derived from the GitHub context (env vars like GITHUB_REF / base branch of the PR)
- Confirm the GITHUB_TOKEN has actions:read scope and is not expired
- Add debug logging of the fetched workflows list to see what the filter actually matched
Example fix
# before: tracked names drifted from the workflows
tracked_workflows = {"CI", "Docker"}
# after: names match .github/workflows 'name:' fields exactly
tracked_workflows = {"Rust", "Wasm", "Docker Build"} Defensive patterns
Strategy: validation
Validate before calling
// Before init: confirm the tracked names match real workflows, with a diagnostic.
let workflows = github.workflows(&github.workflows_handler()).await?;
if workflows.iter().all(|w| !tracked_workflows.contains(&w.name)) {
let known: Vec<_> = workflows.iter().map(|w| w.name.clone()).collect();
anyhow::bail!("tracked_workflows match no workflow; known workflows: {known:?}");
} Try / catch
if let Err(e) = PerformanceSummary::init(github, tracked).await {
if e.to_string().contains("No base jobs found!") {
// skip posting the PR comment rather than failing the whole CI job
}
} Prevention
- Keep the tracked workflow list in sync with the 'name:' fields in .github/workflows
- Never run the summary tool before the base branch has one green push-event run
- Fail fast on an empty matched-workflows list with a message listing the available workflow names
When it happens
Trigger: Calling PerformanceSummary::init when latest_jobs(base_branch, "push", workflows_handler, workflows) returns an empty Vec. This happens when the filtered `workflows` list is empty because tracked_workflows entries don't match the repo's workflow names, the base branch has no completed push-event runs of those workflows, or the GitHub token/context points at the wrong repository or branch.
Common situations: The tracked workflow list in the tool's config has drifted from the actual .github/workflows 'name:' fields; running against a fresh branch or fork with no green base-branch CI runs; an expired or scoped-down GITHUB_TOKEN that can read workflows but not workflow runs; running the tool locally with the wrong repository context.
Related errors
- No PR 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/4b47d384257d366c.
Report an issue: GitHub.