Skip to content

Commit 1c22311

Browse files
authored
Rollup merge of rust-lang#138053 - Kobzol:more-try-jobs, r=marcoieni
Increase the max. custom try jobs requested to `20` Requested [here](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Increase.20try-job.20limit). r? ``@marcoieni``
2 parents 802b70a + 3dbf3dc commit 1c22311

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
@@ -182,6 +182,10 @@ fn yaml_map_to_json(map: &BTreeMap<String, Value>) -> BTreeMap<String, serde_jso
182182
.collect()
183183
}
184184

185+
/// Maximum number of custom try jobs that can be requested in a single
186+
/// `@bors try` request.
187+
const MAX_TRY_JOBS_COUNT: usize = 20;
188+
185189
fn calculate_jobs(
186190
run_type: &RunType,
187191
db: &JobDatabase,
@@ -191,9 +195,9 @@ fn calculate_jobs(
191195
RunType::PullRequest => (db.pr_jobs.clone(), "PR", &db.envs.pr_env),
192196
RunType::TryJob { custom_jobs } => {
193197
let jobs = if let Some(custom_jobs) = custom_jobs {
194-
if custom_jobs.len() > 10 {
198+
if custom_jobs.len() > MAX_TRY_JOBS_COUNT {
195199
return Err(anyhow::anyhow!(
196-
"It is only possible to schedule up to 10 custom jobs, received {} custom jobs",
200+
"It is only possible to schedule up to {MAX_TRY_JOBS_COUNT} custom jobs, received {} custom jobs",
197201
custom_jobs.len()
198202
));
199203
}

0 commit comments

Comments
 (0)