Skip to content

Commit 3dbf3dc

Browse files
committed
Increase the max. custom try jobs requested to 20
1 parent ac951d3 commit 3dbf3dc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/ci/citool/src/main.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,10 @@ fn yaml_map_to_json(map: &BTreeMap<String, Value>) -> BTreeMap<String, serde_jso
180180
.collect()
181181
}
182182

183+
/// Maximum number of custom try jobs that can be requested in a single
184+
/// `@bors try` request.
185+
const MAX_TRY_JOBS_COUNT: usize = 20;
186+
183187
fn calculate_jobs(
184188
run_type: &RunType,
185189
db: &JobDatabase,
@@ -189,9 +193,9 @@ fn calculate_jobs(
189193
RunType::PullRequest => (db.pr_jobs.clone(), "PR", &db.envs.pr_env),
190194
RunType::TryJob { custom_jobs } => {
191195
let jobs = if let Some(custom_jobs) = custom_jobs {
192-
if custom_jobs.len() > 10 {
196+
if custom_jobs.len() > MAX_TRY_JOBS_COUNT {
193197
return Err(anyhow::anyhow!(
194-
"It is only possible to schedule up to 10 custom jobs, received {} custom jobs",
198+
"It is only possible to schedule up to {MAX_TRY_JOBS_COUNT} custom jobs, received {} custom jobs",
195199
custom_jobs.len()
196200
));
197201
}

0 commit comments

Comments
 (0)