{"record":{"id":"a7dea65d967e2892","repo":"rust-lang/rust","slug":"auto-job-job-cannot-have-continue-on-error-t","errorCode":null,"errorMessage":"Auto job `{job}` cannot have `continue_on_error: true`. If the job should be optional, name it `optional-{job}`.","messagePattern":"Auto job `(.+?)` cannot have `continue_on_error: true`\\. If the job should be optional, name it `optional-(.+?)`\\.","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/ci/citool/src/jobs.rs","lineNumber":208,"sourceCode":"            ))\n        }\n    }\n\n    for pr_job in &db.pr_jobs {\n        // At this point, any PR job must also be an Auto job, auto-registered or overridden.\n        let auto_job = db\n            .find_auto_job_by_name(&pr_job.name)\n            .expect(\"PR job must either be auto-registered as Auto job or overridden\");\n\n        equivalent_modulo_carve_out(pr_job, auto_job)?;\n    }\n\n    // Auto CI should \"fail-fast\" to avoid wasting Auto CI resources.\n    // However, some experimental auto jobs can be made optional, for example if we are unsure about\n    // their flakiness. Those have to be prefixed with `optional-`.\n    for auto_job in &db.auto_jobs {\n        if auto_job.continue_on_error == Some(true) && !auto_job.name.starts_with(\"optional-\") {\n            return Err(anyhow!(\n                \"Auto job `{job}` cannot have `continue_on_error: true`. If the job should be optional, name it `optional-{job}`.\",\n                job = auto_job.name\n            ));\n        }\n    }\n\n    Ok(())\n}\n\n/// Representation of a job outputted to a GitHub Actions workflow.\n#[derive(serde::Serialize, Debug)]\nstruct GithubActionsJob {\n    /// The main identifier of the job, used by CI scripts to determine what should be executed.\n    name: String,\n    /// Helper label displayed in GitHub Actions interface, containing the job name and a run type\n    /// prefix (PR/try/auto).\n    full_name: String,\n    os: String,","sourceCodeStart":190,"sourceCodeEnd":226,"githubUrl":"https://github.com/rust-lang/rust/blob/7088e4b63a9516ebfbfe2ab2d999cf01a528ac14/src/ci/citool/src/jobs.rs#L190-L226","documentation":"citool's validate_job_database enforces fail-fast on Auto CI: a non-optional Auto job must not set continue_on_error: true (jobs.rs:206-212). Only jobs whose name starts with optional- are permitted to be non-fatal; any other Auto job with continue_on_error: Some(true) is rejected.","triggerScenarios":"Adding continue_on_error: true to an Auto job whose name does not start with optional- in the CI job config.","commonSituations":"Trying to make a flaky/experimental Auto job non-fatal without renaming it; copy-pasting an optional job's config onto a regular Auto job.","solutions":["Rename the job to start with optional- if it should be non-fatal: optional-{job}.","Remove continue_on_error: true from the Auto job if it must fail-fast.","Move the experimental job into the optional section instead of toggling continue_on_error."],"exampleFix":"# before\nauto_jobs:\n  - name: x86_64-gnu-experimental\n    continue_on_error: true   # error\n\n# after\nauto_jobs:\n  - name: optional-x86_64-gnu-experimental\n    continue_on_error: true","handlingStrategy":"validation","validationCode":"fn validate_auto_optional(auto_jobs: &[Job]) -> Result<(), String> {\n    for j in auto_jobs {\n        if j.continue_on_error == Some(true) && !j.name.starts_with(\"optional-\") {\n            return Err(format!(\"Auto job `{}` cannot have continue_on_error: true; rename to optional-{}\", j.name, j.name));\n        }\n    }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prefix non-fatal Auto jobs with optional-.","Do not set continue_on_error on regular Auto jobs.","Run citool validation locally before push."],"tags":["citool","ci","config","jobs","validation"],"backgroundTag":null,"analyzedSha":"7088e4b63a9516ebfbfe2ab2d999cf01a528ac14","analyzedAt":"2026-08-10T14:17:03.603Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}