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

  1. Verify each tracked workflow name matches the 'name:' field in .github/workflows files exactly (case-sensitive)
  2. Ensure the base branch has at least one completed run of those workflows triggered by a push event
  3. Check the base branch name the tool derived from the GitHub context (env vars like GITHUB_REF / base branch of the PR)
  4. Confirm the GITHUB_TOKEN has actions:read scope and is not expired
  5. 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

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


AI-assisted analysis of linera-io/linera-protocol@6c226ddcb3 (2026-08-22). Data as JSON: /api/errors/4b47d384257d366c. Report an issue: GitHub.