Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: persistent task concurrency check #5806

Merged
merged 1 commit into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/turborepo-lib/src/engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ pub enum ValidateError {
dependant: String,
},
#[error(
"You have {persistent_count} persistent tasks, but `turbo` is configured for concurrency \
of {concurrency}. Set --concurrency to at least {persistent_count}"
"You have {persistent_count} persistent tasks but `turbo` is configured for concurrency \
of {concurrency}. Set --concurrency to at least {}", persistent_count+1
)]
PersistentTasksExceedConcurrency {
persistent_count: u32,
Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-lib/src/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
pub struct RunOpts<'a> {
pub(crate) tasks: &'a [String],
pub(crate) concurrency: u32,
parallel: bool,

Check warning on line 60 in crates/turborepo-lib/src/opts.rs

View workflow job for this annotation

GitHub Actions / Build Turborepo (ubuntu, ubuntu-latest)

fields `parallel`, `profile`, `continue_on_error`, `passthrough_args`, `dry_run`, and `summarize` are never read

Check warning on line 60 in crates/turborepo-lib/src/opts.rs

View workflow job for this annotation

GitHub Actions / Build Turborepo (macos, macos-latest)

fields `parallel`, `profile`, `continue_on_error`, `passthrough_args`, `dry_run`, and `summarize` are never read

Check warning on line 60 in crates/turborepo-lib/src/opts.rs

View workflow job for this annotation

GitHub Actions / Build Turborepo (windows, windows-latest)

fields `parallel`, `profile`, `continue_on_error`, `passthrough_args`, `dry_run`, and `summarize` are never read

Check warning on line 60 in crates/turborepo-lib/src/opts.rs

View workflow job for this annotation

GitHub Actions / Go Integration Tests (ubuntu, ubuntu-latest)

fields `parallel`, `profile`, `continue_on_error`, `passthrough_args`, `dry_run`, and `summarize` are never read

Check warning on line 60 in crates/turborepo-lib/src/opts.rs

View workflow job for this annotation

GitHub Actions / Turborepo E2E Tests (ubuntu, ubuntu-latest)

fields `parallel`, `profile`, `continue_on_error`, `passthrough_args`, `dry_run`, and `summarize` are never read

Check warning on line 60 in crates/turborepo-lib/src/opts.rs

View workflow job for this annotation

GitHub Actions / Turborepo E2E Tests (macos, macos-latest)

fields `parallel`, `profile`, `continue_on_error`, `passthrough_args`, `dry_run`, and `summarize` are never read

Check warning on line 60 in crates/turborepo-lib/src/opts.rs

View workflow job for this annotation

GitHub Actions / Turborepo Examples (ubuntu, ubuntu-latest)

fields `parallel`, `profile`, `continue_on_error`, `passthrough_args`, `dry_run`, and `summarize` are never read

Check warning on line 60 in crates/turborepo-lib/src/opts.rs

View workflow job for this annotation

GitHub Actions / Turborepo E2E Tests (windows, windows-latest)

fields `parallel`, `profile`, `continue_on_error`, `passthrough_args`, `dry_run`, and `summarize` are never read

Check warning on line 60 in crates/turborepo-lib/src/opts.rs

View workflow job for this annotation

GitHub Actions / Turborepo Examples (macos, macos-latest)

fields `parallel`, `profile`, `continue_on_error`, `passthrough_args`, `dry_run`, and `summarize` are never read
pub(crate) env_mode: EnvMode,
// Whether or not to infer the framework for each workspace.
pub(crate) framework_inference: bool,
Expand Down Expand Up @@ -147,7 +147,7 @@
};
}
match concurrency_raw.parse::<u32>() {
Ok(concurrency) if concurrency > 1 => Ok(concurrency),
Ok(concurrency) if concurrency >= 1 => Ok(concurrency),
Ok(_) | Err(_) => Err(anyhow!(
"invalid value for --concurrency CLI flag. This should be a positive integer greater \
than or equal to 1: {}",
Expand Down
Loading