about summary refs log tree commit diff
path: root/src/ci/citool
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-03-05 12:27:10 +0100
committerJakub Beránek <berykubik@gmail.com>2025-03-05 12:27:10 +0100
commit3dbf3dc1e187d1c0654870597f85fdff4f5a640f (patch)
tree3a4247864c6ac23e032c2f9072093702f3a7aab7 /src/ci/citool
parentac951d379913c667a1fb73a0830e81d65d2007cf (diff)
downloadrust-3dbf3dc1e187d1c0654870597f85fdff4f5a640f.tar.gz
rust-3dbf3dc1e187d1c0654870597f85fdff4f5a640f.zip
Increase the max. custom try jobs requested to `20`
Diffstat (limited to 'src/ci/citool')
-rw-r--r--src/ci/citool/src/main.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ci/citool/src/main.rs b/src/ci/citool/src/main.rs
index cef92e998da..6a5643ab37a 100644
--- a/src/ci/citool/src/main.rs
+++ b/src/ci/citool/src/main.rs
@@ -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,
@@ -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()
                     ));
                 }