diff options
| author | Michael Goulet <michael@errs.io> | 2025-03-06 15:40:02 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-06 15:40:02 -0500 |
| commit | b16f1ac5ff64359722fbcfed9ff871277705ae1d (patch) | |
| tree | 1e4377ead974b5c21c06c03023e31a591472e192 | |
| parent | 3ce0614950430fb2cf3a93b101155d0f95fa3343 (diff) | |
| parent | 3dbf3dc1e187d1c0654870597f85fdff4f5a640f (diff) | |
| download | rust-b16f1ac5ff64359722fbcfed9ff871277705ae1d.tar.gz rust-b16f1ac5ff64359722fbcfed9ff871277705ae1d.zip | |
Rollup merge of #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````
| -rw-r--r-- | src/ci/citool/src/main.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ci/citool/src/main.rs b/src/ci/citool/src/main.rs index a1e5658be36..16edd681886 100644 --- a/src/ci/citool/src/main.rs +++ b/src/ci/citool/src/main.rs @@ -182,6 +182,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, @@ -191,9 +195,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() )); } |
