rust-lang/rust · error · anyhow::Error
PR job `{}` differs from corresponding Auto job `{}` in conf
Error message
PR job `{}` differs from corresponding Auto job `{}` in configuration other than `continue_on_error` and `env` What it means
citool requires that every PR job also exists as an Auto job with identical configuration except for the two carve-out fields env and continue_on_error (jobs.rs:163-188, equivalent_modulo_carve_out). If any other field differs (name, os, only_on_channel, free_disk, doc_url, codebuild, ...) the validation returns the error naming both jobs.
Source
Thrown at src/ci/citool/src/jobs.rs:186
free_disk,
doc_url,
codebuild,
// Carve-out configs allowed to be different.
env: _,
continue_on_error: _,
} = pr_job;
if *name == auto_job.name
&& *os == auto_job.os
&& *only_on_channel == auto_job.only_on_channel
&& *free_disk == auto_job.free_disk
&& *doc_url == auto_job.doc_url
&& *codebuild == auto_job.codebuild
{
Ok(())
} else {
Err(anyhow!(
"PR job `{}` differs from corresponding Auto job `{}` in configuration other than `continue_on_error` and `env`",
pr_job.name,
auto_job.name
))
}
}
for pr_job in &db.pr_jobs {
// At this point, any PR job must also be an Auto job, auto-registered or overridden.
let auto_job = db
.find_auto_job_by_name(&pr_job.name)
.expect("PR job must either be auto-registered as Auto job or overridden");
equivalent_modulo_carve_out(pr_job, auto_job)?;
}
// Auto CI should "fail-fast" to avoid wasting Auto CI resources.
// However, some experimental auto jobs can be made optional, for example if we are unsure aboutView on GitHub (pinned to 7088e4b63a)
Solutions
- Make the PR and Auto entries for that job identical in os, only_on_channel, free_disk, doc_url, and codebuild.
- Keep differences to env and continue_on_error only, which are explicitly allowed.
- If the two really must differ, rename one of them so they are treated as separate jobs.
- Diff the two YAML blocks side by side and align every non-carve-out field.
Example fix
# before
pr_jobs:
- name: x86_64-gnu
os: linux
auto_jobs:
- name: x86_64-gnu
os: macos # mismatch -> error
# after
auto_jobs:
- name: x86_64-gnu
os: linux Defensive patterns
Strategy: validation
Validate before calling
fn equivalent_modulo_carve_out(pr: &Job, auto: &Job) -> bool {
pr.name == auto.name
&& pr.os == auto.os
&& pr.only_on_channel == auto.only_on_channel
&& pr.free_disk == auto.free_disk
&& pr.doc_url == auto.doc_url
&& pr.codebuild == auto.codebuild
}
// For each pr job with a matching auto job, assert equivalent_modulo_carve_out before submitting. Prevention
- Keep PR and Auto entries for the same job identical except env/continue_on_error.
- Diff the two YAML blocks before pushing.
- Rename a job if it genuinely needs different os/channel/free_disk.
When it happens
Trigger: Defining a job in the pr section and another with the same name in the auto section but with a different os, only_on_channel, free_disk, doc_url, or codebuild value.
Common situations: Changing a job to run on a different OS in PR vs Auto, enabling free_disk only on one side, or mismatched doc_url/codebuild after a refactor.
Related errors
- duplicate job name `{job_name}` in section `{section}`
- Auto job `{job}` cannot have `continue_on_error: true`. If t
- Patterns `{}` did not match any auto jobs
- It is only possible to schedule up to {MAX_TRY_JOBS_COUNT} c
- config key {} not in sections or top_level_keys
AI-assisted analysis of rust-lang/rust@7088e4b63a (2026-08-10).
Data as JSON: /api/errors/dc13b84acad07f4e.
Report an issue: GitHub.