{"record":{"id":"9fc1b13f785d7d19","repo":"rust-lang/rust","slug":"patterns-did-not-match-any-auto-jobs","errorCode":null,"errorMessage":"Patterns `{}` did not match any auto jobs","messagePattern":"Patterns `(.+?)` did not match any auto jobs","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/ci/citool/src/jobs.rs","lineNumber":309,"sourceCode":"        RunType::PullRequest => (db.pr_jobs.clone(), \"PR\", &db.envs.pr_env),\n        RunType::TryJob { job_patterns } => {\n            let jobs = if let Some(patterns) = job_patterns {\n                let mut jobs: Vec<Job> = vec![];\n                let mut unknown_patterns = vec![];\n                for pattern in patterns {\n                    let matched_jobs = db.find_auto_or_optional_jobs_by_pattern(pattern);\n                    if matched_jobs.is_empty() {\n                        unknown_patterns.push(pattern.clone());\n                    } else {\n                        for job in matched_jobs {\n                            if !jobs.iter().any(|j| j.name == job.name) {\n                                jobs.push(job);\n                            }\n                        }\n                    }\n                }\n                if !unknown_patterns.is_empty() {\n                    return Err(anyhow::anyhow!(\n                        \"Patterns `{}` did not match any auto jobs\",\n                        unknown_patterns.join(\", \")\n                    ));\n                }\n                if jobs.len() > MAX_TRY_JOBS_COUNT {\n                    return Err(anyhow::anyhow!(\n                        \"It is only possible to schedule up to {MAX_TRY_JOBS_COUNT} custom jobs, received {} custom jobs expanded from {} pattern(s)\",\n                        jobs.len(),\n                        patterns.len()\n                    ));\n                }\n                jobs\n            } else {\n                db.try_jobs.clone()\n            };\n            (jobs, \"try\", &db.envs.try_env)\n        }\n        RunType::AutoJob => (db.auto_jobs.clone(), \"auto\", &db.envs.auto_env),","sourceCodeStart":291,"sourceCodeEnd":327,"githubUrl":"https://github.com/rust-lang/rust/blob/7088e4b63a9516ebfbfe2ab2d999cf01a528ac14/src/ci/citool/src/jobs.rs#L291-L327","documentation":"When citool expands try-job patterns via RunType::TryJob (jobs.rs:292-313), each pattern is matched against auto and optional jobs. If a pattern matches no jobs at all it is collected into unknown_patterns, and once all patterns are processed the error 'Patterns ... did not match any auto jobs' is returned with the comma-joined list.","triggerScenarios":"Running a try build with @bors try job-patterns that do not correspond to any existing auto or optional job name — a typo, an outdated name, or a glob that matches nothing (note matching is done via find_auto_or_optional_jobs_by_pattern, not regex).","commonSituations":"Renaming/removing a job but referencing the old name in a try-job pattern; typos in the pattern; expecting shell-glob semantics when the matcher uses a different scheme.","solutions":["Check the current auto/optional job names and fix the typo or use an exact existing name.","List available jobs (e.g. via citool's job listing) before submitting the try-job pattern.","Verify whether the matcher is glob/substring/exact and adjust the pattern accordingly.","Remove patterns that target jobs that no longer exist."],"exampleFix":"# before\n@bors try ping=foo dist-x86_64-unkown-linux   # typo -> error\n\n# after\n@bors try ping=foo dist-x86_64-unknown-linux-gnu","handlingStrategy":"validation","validationCode":"// Expand patterns the same way citool does and check for emptiness.\nfn matches_any(pattern: &str, job_names: &[&str]) -> bool {\n    job_names.iter().any(|n| pattern_matches(pattern, n))\n}\n// if patterns.iter().any(|p| !matches_any(p, &known_names)) { return Err(...) }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Cross-check try-job patterns against the current auto/optional job names.","Avoid typos by copy-pasting job names from the listing.","List available jobs before submitting @bors try."],"tags":["citool","ci","try-job","jobs","validation"],"backgroundTag":null,"analyzedSha":"7088e4b63a9516ebfbfe2ab2d999cf01a528ac14","analyzedAt":"2026-08-10T14:17:03.603Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}