Skip to content

Commit

Permalink
Increase the max. custom try jobs requested to 20
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobzol committed Mar 5, 2025
1 parent ac951d3 commit 3dbf3dc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/ci/citool/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ fn yaml_map_to_json(map: &BTreeMap<String, Value>) -> BTreeMap<String, serde_jso
.collect()
}

/// Maximum number of custom try jobs that can be requested in a single
/// `@bors try` request.
const MAX_TRY_JOBS_COUNT: usize = 20;

fn calculate_jobs(
run_type: &RunType,
db: &JobDatabase,
Expand All @@ -189,9 +193,9 @@ fn calculate_jobs(
RunType::PullRequest => (db.pr_jobs.clone(), "PR", &db.envs.pr_env),
RunType::TryJob { custom_jobs } => {
let jobs = if let Some(custom_jobs) = custom_jobs {
if custom_jobs.len() > 10 {
if custom_jobs.len() > MAX_TRY_JOBS_COUNT {
return Err(anyhow::anyhow!(
"It is only possible to schedule up to 10 custom jobs, received {} custom jobs",
"It is only possible to schedule up to {MAX_TRY_JOBS_COUNT} custom jobs, received {} custom jobs",
custom_jobs.len()
));
}
Expand Down

0 comments on commit 3dbf3dc

Please sign in to comment.