Skip to content

Commit ac062fd

Browse files
committed
Allow auto jobs to be non-blocking
1 parent 3b1b0ef commit ac062fd

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/ci/citool/src/jobs.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,14 @@ fn validate_job_database(db: &JobDatabase) -> anyhow::Result<()> {
200200
equivalent_modulo_carve_out(pr_job, auto_job)?;
201201
}
202202

203-
// Auto CI jobs must all "fail-fast" to avoid wasting Auto CI resources. For instance, `tidy`.
203+
// Auto CI should "fail-fast" to avoid wasting Auto CI resources.
204+
// However, some experimental auto jobs can be made optional, for example if we are unsure about
205+
// their flakiness. Those have to be prefixed with `optional-`.
204206
for auto_job in &db.auto_jobs {
205-
if auto_job.continue_on_error == Some(true) {
207+
if auto_job.continue_on_error == Some(true) && !auto_job.name.starts_with("optional-") {
206208
return Err(anyhow!(
207-
"Auto job `{}` cannot have `continue_on_error: true`",
208-
auto_job.name
209+
"Auto job `{job}` cannot have `continue_on_error: true`. If the job should be optional, name it `optional-{job}`.",
210+
job = auto_job.name
209211
));
210212
}
211213
}

0 commit comments

Comments
 (0)