From 04c55780bc621d3ee70c5b60e5018b70b2407d9c Mon Sep 17 00:00:00 2001 From: Copilot <223556219+Copilot@users.noreply.github.com> Date: Thu, 17 Sep 2026 19:45:26 +0000 Subject: [PATCH] feat(cli): add global concurrency control Add --concurrency as the shared base limit for parallel operations. The value defaults to the number of logical CPUs, with CPU-bound, I/O-bound, and fast worker pools using 1x, 2x, and 4x that value respectively. Handle automatic, explicit, and clamped values consistently, add test coverage, and regenerate the CLI reference documentation. Refs: #356 --- docs/user/reference/cli/azldev.md | 1 + docs/user/reference/cli/azldev_advanced.md | 1 + .../cli/azldev_advanced_download-sources.md | 1 + .../user/reference/cli/azldev_advanced_mcp.md | 1 + .../reference/cli/azldev_advanced_mock.md | 1 + .../cli/azldev_advanced_mock_build-rpms.md | 1 + .../cli/azldev_advanced_mock_shell.md | 1 + .../reference/cli/azldev_advanced_wget.md | 1 + docs/user/reference/cli/azldev_completion.md | 1 + .../reference/cli/azldev_completion_bash.md | 1 + .../reference/cli/azldev_completion_fish.md | 1 + .../cli/azldev_completion_powershell.md | 1 + .../reference/cli/azldev_completion_zsh.md | 1 + docs/user/reference/cli/azldev_component.md | 1 + .../reference/cli/azldev_component_add.md | 1 + .../reference/cli/azldev_component_build.md | 1 + .../reference/cli/azldev_component_changed.md | 1 + .../cli/azldev_component_diff-sources.md | 1 + .../reference/cli/azldev_component_history.md | 1 + .../reference/cli/azldev_component_list.md | 1 + .../cli/azldev_component_prepare-sources.md | 1 + .../reference/cli/azldev_component_query.md | 1 + .../reference/cli/azldev_component_render.md | 1 + .../reference/cli/azldev_component_test.md | 1 + .../reference/cli/azldev_component_update.md | 1 + docs/user/reference/cli/azldev_config.md | 1 + docs/user/reference/cli/azldev_config_dump.md | 1 + .../cli/azldev_config_generate-schema.md | 1 + docs/user/reference/cli/azldev_docs.md | 1 + docs/user/reference/cli/azldev_docs_agent.md | 1 + .../cli/azldev_docs_agent_install.md | 1 + .../reference/cli/azldev_docs_agent_show.md | 1 + .../reference/cli/azldev_docs_markdown.md | 1 + docs/user/reference/cli/azldev_image.md | 1 + docs/user/reference/cli/azldev_image_boot.md | 1 + docs/user/reference/cli/azldev_image_build.md | 1 + .../reference/cli/azldev_image_customize.md | 1 + .../cli/azldev_image_inject-files.md | 1 + docs/user/reference/cli/azldev_image_list.md | 1 + docs/user/reference/cli/azldev_image_test.md | 1 + docs/user/reference/cli/azldev_package.md | 1 + .../user/reference/cli/azldev_package_list.md | 1 + docs/user/reference/cli/azldev_project.md | 1 + .../user/reference/cli/azldev_project_init.md | 1 + docs/user/reference/cli/azldev_project_new.md | 1 + docs/user/reference/cli/azldev_repo.md | 1 + .../user/reference/cli/azldev_repo_compare.md | 1 + docs/user/reference/cli/azldev_repo_query.md | 1 + docs/user/reference/cli/azldev_version.md | 1 + internal/app/azldev/app.go | 4 ++ internal/app/azldev/app_test.go | 44 ++++++++++++++++ internal/app/azldev/env.go | 38 +++++++++++--- internal/app/azldev/env_test.go | 28 +++++++++++ .../TestMCPServerMode_1.snap.json | 50 +++++++++++++++++++ ...pshotsContainer_--bogus-flag_stderr_1.snap | 1 + ...estSnapshotsContainer_--help_stdout_1.snap | 1 + .../TestSnapshotsContainer_help_stdout_1.snap | 1 + .../TestSnapshots_--bogus-flag_stderr_1.snap | 1 + .../TestSnapshots_--help_stdout_1.snap | 1 + ...tSnapshots_--help_with_color_stdout_1.snap | 1 + .../TestSnapshots_help_stdout_1.snap | 1 + 61 files changed, 213 insertions(+), 7 deletions(-) diff --git a/docs/user/reference/cli/azldev.md b/docs/user/reference/cli/azldev.md index 8116c782c..c5de33703 100644 --- a/docs/user/reference/cli/azldev.md +++ b/docs/user/reference/cli/azldev.md @@ -19,6 +19,7 @@ lives), or use -C to point to one. ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) -h, --help help for azldev diff --git a/docs/user/reference/cli/azldev_advanced.md b/docs/user/reference/cli/azldev_advanced.md index 5cb29e12d..f76116d52 100644 --- a/docs/user/reference/cli/azldev_advanced.md +++ b/docs/user/reference/cli/azldev_advanced.md @@ -23,6 +23,7 @@ output but fully supported. ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_advanced_download-sources.md b/docs/user/reference/cli/azldev_advanced_download-sources.md index 66c7bfd34..7758ecd08 100644 --- a/docs/user/reference/cli/azldev_advanced_download-sources.md +++ b/docs/user/reference/cli/azldev_advanced_download-sources.md @@ -61,6 +61,7 @@ azldev advanced download-sources [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_advanced_mcp.md b/docs/user/reference/cli/azldev_advanced_mcp.md index 861981896..1f62c5e0c 100644 --- a/docs/user/reference/cli/azldev_advanced_mcp.md +++ b/docs/user/reference/cli/azldev_advanced_mcp.md @@ -34,6 +34,7 @@ azldev advanced mcp [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_advanced_mock.md b/docs/user/reference/cli/azldev_advanced_mock.md index c7f694261..984278eea 100644 --- a/docs/user/reference/cli/azldev_advanced_mock.md +++ b/docs/user/reference/cli/azldev_advanced_mock.md @@ -22,6 +22,7 @@ starting interactive shell sessions in mock chroot environments. ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_advanced_mock_build-rpms.md b/docs/user/reference/cli/azldev_advanced_mock_build-rpms.md index df76d2155..18e1be1a3 100644 --- a/docs/user/reference/cli/azldev_advanced_mock_build-rpms.md +++ b/docs/user/reference/cli/azldev_advanced_mock_build-rpms.md @@ -41,6 +41,7 @@ azldev advanced mock build-rpms [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_advanced_mock_shell.md b/docs/user/reference/cli/azldev_advanced_mock_shell.md index 6fbc6e521..54d6ebc76 100644 --- a/docs/user/reference/cli/azldev_advanced_mock_shell.md +++ b/docs/user/reference/cli/azldev_advanced_mock_shell.md @@ -46,6 +46,7 @@ azldev advanced mock shell [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_advanced_wget.md b/docs/user/reference/cli/azldev_advanced_wget.md index 6aa762683..aa23ba04a 100644 --- a/docs/user/reference/cli/azldev_advanced_wget.md +++ b/docs/user/reference/cli/azldev_advanced_wget.md @@ -35,6 +35,7 @@ azldev advanced wget URI [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_completion.md b/docs/user/reference/cli/azldev_completion.md index dc273efb1..109d7858e 100644 --- a/docs/user/reference/cli/azldev_completion.md +++ b/docs/user/reference/cli/azldev_completion.md @@ -21,6 +21,7 @@ See each sub-command's help for details on how to use the generated script. ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_completion_bash.md b/docs/user/reference/cli/azldev_completion_bash.md index 5e9ddcaea..f39580feb 100644 --- a/docs/user/reference/cli/azldev_completion_bash.md +++ b/docs/user/reference/cli/azldev_completion_bash.md @@ -44,6 +44,7 @@ azldev completion bash ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_completion_fish.md b/docs/user/reference/cli/azldev_completion_fish.md index 537f2481f..42eaf1dd5 100644 --- a/docs/user/reference/cli/azldev_completion_fish.md +++ b/docs/user/reference/cli/azldev_completion_fish.md @@ -35,6 +35,7 @@ azldev completion fish [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_completion_powershell.md b/docs/user/reference/cli/azldev_completion_powershell.md index 7c66365c1..6565209e0 100644 --- a/docs/user/reference/cli/azldev_completion_powershell.md +++ b/docs/user/reference/cli/azldev_completion_powershell.md @@ -32,6 +32,7 @@ azldev completion powershell [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_completion_zsh.md b/docs/user/reference/cli/azldev_completion_zsh.md index 8f65002a1..aa7d5d7a4 100644 --- a/docs/user/reference/cli/azldev_completion_zsh.md +++ b/docs/user/reference/cli/azldev_completion_zsh.md @@ -46,6 +46,7 @@ azldev completion zsh [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_component.md b/docs/user/reference/cli/azldev_component.md index f45424f0f..b87086a50 100644 --- a/docs/user/reference/cli/azldev_component.md +++ b/docs/user/reference/cli/azldev_component.md @@ -24,6 +24,7 @@ components defined in the project configuration. ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_component_add.md b/docs/user/reference/cli/azldev_component_add.md index e01bd9003..070f3a07f 100644 --- a/docs/user/reference/cli/azldev_component_add.md +++ b/docs/user/reference/cli/azldev_component_add.md @@ -37,6 +37,7 @@ azldev component add [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_component_build.md b/docs/user/reference/cli/azldev_component_build.md index f25436c8b..e8318acdc 100644 --- a/docs/user/reference/cli/azldev_component_build.md +++ b/docs/user/reference/cli/azldev_component_build.md @@ -68,6 +68,7 @@ azldev component build [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_component_changed.md b/docs/user/reference/cli/azldev_component_changed.md index d8908e341..e12408296 100644 --- a/docs/user/reference/cli/azldev_component_changed.md +++ b/docs/user/reference/cli/azldev_component_changed.md @@ -64,6 +64,7 @@ azldev component changed [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_component_diff-sources.md b/docs/user/reference/cli/azldev_component_diff-sources.md index 33930191b..f80953e71 100644 --- a/docs/user/reference/cli/azldev_component_diff-sources.md +++ b/docs/user/reference/cli/azldev_component_diff-sources.md @@ -31,6 +31,7 @@ azldev component diff-sources [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_component_history.md b/docs/user/reference/cli/azldev_component_history.md index c5d4d90f7..3456b1af3 100644 --- a/docs/user/reference/cli/azldev_component_history.md +++ b/docs/user/reference/cli/azldev_component_history.md @@ -57,6 +57,7 @@ azldev component history [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_component_list.md b/docs/user/reference/cli/azldev_component_list.md index 0335f4fd8..ea901f715 100644 --- a/docs/user/reference/cli/azldev_component_list.md +++ b/docs/user/reference/cli/azldev_component_list.md @@ -46,6 +46,7 @@ azldev component list [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_component_prepare-sources.md b/docs/user/reference/cli/azldev_component_prepare-sources.md index 4d4596d92..ff7c68a4e 100644 --- a/docs/user/reference/cli/azldev_component_prepare-sources.md +++ b/docs/user/reference/cli/azldev_component_prepare-sources.md @@ -51,6 +51,7 @@ azldev component prepare-sources [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_component_query.md b/docs/user/reference/cli/azldev_component_query.md index edc64bc11..40d60ed3b 100644 --- a/docs/user/reference/cli/azldev_component_query.md +++ b/docs/user/reference/cli/azldev_component_query.md @@ -49,6 +49,7 @@ azldev component query [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_component_render.md b/docs/user/reference/cli/azldev_component_render.md index 6ffcbc4d9..133e3b553 100644 --- a/docs/user/reference/cli/azldev_component_render.md +++ b/docs/user/reference/cli/azldev_component_render.md @@ -71,6 +71,7 @@ azldev component render [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_component_test.md b/docs/user/reference/cli/azldev_component_test.md index 3a42cec54..9352a0ab7 100644 --- a/docs/user/reference/cli/azldev_component_test.md +++ b/docs/user/reference/cli/azldev_component_test.md @@ -85,6 +85,7 @@ azldev component test COMPONENT [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_component_update.md b/docs/user/reference/cli/azldev_component_update.md index 574556b5d..d11b4b8ed 100644 --- a/docs/user/reference/cli/azldev_component_update.md +++ b/docs/user/reference/cli/azldev_component_update.md @@ -69,6 +69,7 @@ azldev component update [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_config.md b/docs/user/reference/cli/azldev_config.md index 5a1310dfe..6eed54b63 100644 --- a/docs/user/reference/cli/azldev_config.md +++ b/docs/user/reference/cli/azldev_config.md @@ -22,6 +22,7 @@ JSON schema used for validating TOML config files. ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_config_dump.md b/docs/user/reference/cli/azldev_config_dump.md index 015c61f94..7136efc12 100644 --- a/docs/user/reference/cli/azldev_config_dump.md +++ b/docs/user/reference/cli/azldev_config_dump.md @@ -42,6 +42,7 @@ azldev config dump [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_config_generate-schema.md b/docs/user/reference/cli/azldev_config_generate-schema.md index 9ff83f63a..2f4eece5a 100644 --- a/docs/user/reference/cli/azldev_config_generate-schema.md +++ b/docs/user/reference/cli/azldev_config_generate-schema.md @@ -36,6 +36,7 @@ azldev config generate-schema [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_docs.md b/docs/user/reference/cli/azldev_docs.md index d1409553e..787033cbb 100644 --- a/docs/user/reference/cli/azldev_docs.md +++ b/docs/user/reference/cli/azldev_docs.md @@ -22,6 +22,7 @@ command tree, suitable for inclusion in the user guide. ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_docs_agent.md b/docs/user/reference/cli/azldev_docs_agent.md index eb45bcf16..fd1c785b0 100644 --- a/docs/user/reference/cli/azldev_docs_agent.md +++ b/docs/user/reference/cli/azldev_docs_agent.md @@ -24,6 +24,7 @@ reference so that agents always load the guidance that ships with the binary. ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_docs_agent_install.md b/docs/user/reference/cli/azldev_docs_agent_install.md index 343d2013d..c8c8853a5 100644 --- a/docs/user/reference/cli/azldev_docs_agent_install.md +++ b/docs/user/reference/cli/azldev_docs_agent_install.md @@ -64,6 +64,7 @@ azldev docs agent install [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_docs_agent_show.md b/docs/user/reference/cli/azldev_docs_agent_show.md index 4d03a7f0f..11d32383c 100644 --- a/docs/user/reference/cli/azldev_docs_agent_show.md +++ b/docs/user/reference/cli/azldev_docs_agent_show.md @@ -41,6 +41,7 @@ azldev docs agent show [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_docs_markdown.md b/docs/user/reference/cli/azldev_docs_markdown.md index de9864f18..a86b59b4d 100644 --- a/docs/user/reference/cli/azldev_docs_markdown.md +++ b/docs/user/reference/cli/azldev_docs_markdown.md @@ -43,6 +43,7 @@ azldev docs markdown [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_image.md b/docs/user/reference/cli/azldev_image.md index 2235a6268..ea678cf94 100644 --- a/docs/user/reference/cli/azldev_image.md +++ b/docs/user/reference/cli/azldev_image.md @@ -23,6 +23,7 @@ can be customized using Azure Linux Image Customizer. ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_image_boot.md b/docs/user/reference/cli/azldev_image_boot.md index a9b6dfd3c..143536805 100644 --- a/docs/user/reference/cli/azldev_image_boot.md +++ b/docs/user/reference/cli/azldev_image_boot.md @@ -87,6 +87,7 @@ azldev image boot [IMAGE_NAME] [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_image_build.md b/docs/user/reference/cli/azldev_image_build.md index 9a6308987..3c89f6b7a 100644 --- a/docs/user/reference/cli/azldev_image_build.md +++ b/docs/user/reference/cli/azldev_image_build.md @@ -48,6 +48,7 @@ azldev image build [image-name] [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_image_customize.md b/docs/user/reference/cli/azldev_image_customize.md index dfeaf4f5e..929c4f10b 100644 --- a/docs/user/reference/cli/azldev_image_customize.md +++ b/docs/user/reference/cli/azldev_image_customize.md @@ -46,6 +46,7 @@ azldev image customize [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_image_inject-files.md b/docs/user/reference/cli/azldev_image_inject-files.md index 32d3795c5..748bde7f4 100644 --- a/docs/user/reference/cli/azldev_image_inject-files.md +++ b/docs/user/reference/cli/azldev_image_inject-files.md @@ -37,6 +37,7 @@ azldev image inject-files [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_image_list.md b/docs/user/reference/cli/azldev_image_list.md index a96aee0e6..a1270bbd3 100644 --- a/docs/user/reference/cli/azldev_image_list.md +++ b/docs/user/reference/cli/azldev_image_list.md @@ -39,6 +39,7 @@ azldev image list [image-name-pattern...] [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_image_test.md b/docs/user/reference/cli/azldev_image_test.md index fd65d2d3c..e2c1ca54e 100644 --- a/docs/user/reference/cli/azldev_image_test.md +++ b/docs/user/reference/cli/azldev_image_test.md @@ -72,6 +72,7 @@ azldev image test IMAGE_NAME [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_package.md b/docs/user/reference/cli/azldev_package.md index 103db352d..678421bcc 100644 --- a/docs/user/reference/cli/azldev_package.md +++ b/docs/user/reference/cli/azldev_package.md @@ -23,6 +23,7 @@ publish channel assignments derived from package groups and component overrides. ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_package_list.md b/docs/user/reference/cli/azldev_package_list.md index 6b9754eab..e6165273e 100644 --- a/docs/user/reference/cli/azldev_package_list.md +++ b/docs/user/reference/cli/azldev_package_list.md @@ -72,6 +72,7 @@ azldev package list [package-name...] [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_project.md b/docs/user/reference/cli/azldev_project.md index e2f2c332e..fef53ace7 100644 --- a/docs/user/reference/cli/azldev_project.md +++ b/docs/user/reference/cli/azldev_project.md @@ -22,6 +22,7 @@ as an Azure Linux project with a basic configuration. ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_project_init.md b/docs/user/reference/cli/azldev_project_init.md index d133018c4..13be79456 100644 --- a/docs/user/reference/cli/azldev_project_init.md +++ b/docs/user/reference/cli/azldev_project_init.md @@ -33,6 +33,7 @@ azldev project init [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_project_new.md b/docs/user/reference/cli/azldev_project_new.md index 1a615d5f7..b494e46ee 100644 --- a/docs/user/reference/cli/azldev_project_new.md +++ b/docs/user/reference/cli/azldev_project_new.md @@ -36,6 +36,7 @@ azldev project new PATH [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_repo.md b/docs/user/reference/cli/azldev_repo.md index 2c7b088b9..ccbc3f5ee 100644 --- a/docs/user/reference/cli/azldev_repo.md +++ b/docs/user/reference/cli/azldev_repo.md @@ -23,6 +23,7 @@ under one or more URL prefixes. ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_repo_compare.md b/docs/user/reference/cli/azldev_repo_compare.md index 513dfe076..0112145fe 100644 --- a/docs/user/reference/cli/azldev_repo_compare.md +++ b/docs/user/reference/cli/azldev_repo_compare.md @@ -31,6 +31,7 @@ azldev repo compare [flags] ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_repo_query.md b/docs/user/reference/cli/azldev_repo_query.md index b00fb5f74..9086aa1c9 100644 --- a/docs/user/reference/cli/azldev_repo_query.md +++ b/docs/user/reference/cli/azldev_repo_query.md @@ -64,6 +64,7 @@ azldev repo query [flags] -- ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/docs/user/reference/cli/azldev_version.md b/docs/user/reference/cli/azldev_version.md index 9d8707559..5ebddbcdd 100644 --- a/docs/user/reference/cli/azldev_version.md +++ b/docs/user/reference/cli/azldev_version.md @@ -27,6 +27,7 @@ azldev version -O json ``` -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) --network-retries int maximum number of attempts for network operations (minimum 1) (default 3) diff --git a/internal/app/azldev/app.go b/internal/app/azldev/app.go index 6f87ebe45..f9cfda1ae 100644 --- a/internal/app/azldev/app.go +++ b/internal/app/azldev/app.go @@ -46,6 +46,7 @@ type App struct { quiet bool acceptAllPrompts bool dryRun bool + concurrency int networkRetries int reportFormat ReportFormat disableDefaultConfig bool @@ -137,6 +138,7 @@ lives), or use -C to point to one.`, env.SetDefaultReportFormat(app.reportFormat) env.SetAcceptAllPrompts(app.acceptAllPrompts) env.SetColorMode(app.colorMode) + env.SetConcurrency(app.concurrency) env.SetNetworkRetries(app.networkRetries) env.SetPermissiveConfigParsing(app.permissiveConfigEnabled()) @@ -179,6 +181,8 @@ func (app *App) registerGlobalFlags() { app.cmd.PersistentFlags().StringArrayVar(&app.configFiles, "config-file", nil, "additional TOML config file(s) to merge (may be repeated)") app.cmd.PersistentFlags().BoolVarP(&app.dryRun, "dry-run", "n", false, "dry run only (do not take action)") + app.cmd.PersistentFlags().IntVar(&app.concurrency, "concurrency", 0, + "base concurrency limit (default: number of logical CPUs; minimum 1)") app.cmd.PersistentFlags().IntVar(&app.networkRetries, "network-retries", retry.DefaultMaxAttempts, "maximum number of attempts for network operations (minimum 1)") app.cmd.PersistentFlags().VarP(&app.reportFormat, "output-format", "O", diff --git a/internal/app/azldev/app_test.go b/internal/app/azldev/app_test.go index 0531f2db9..64ac1397b 100644 --- a/internal/app/azldev/app_test.go +++ b/internal/app/azldev/app_test.go @@ -4,6 +4,7 @@ package azldev_test import ( + "runtime" "testing" "github.com/microsoft/azure-linux-dev-tools/internal/app/azldev" @@ -194,6 +195,49 @@ func TestApp_PermissiveConfigOption_DefaultFalse(t *testing.T) { assert.True(t, ran) } +func TestApp_ConcurrencyOption(t *testing.T) { + testCases := []struct { + name string + args []string + expected int + }{ + {name: "defaults to logical CPU count", args: []string{"test-cmd"}, expected: runtime.NumCPU()}, + {name: "uses explicit value", args: []string{"--concurrency", "3", "test-cmd"}, expected: 3}, + {name: "supports assignment syntax", args: []string{"test-cmd", "--concurrency=7"}, expected: 7}, + {name: "zero selects logical CPU count", args: []string{"--concurrency=0", "test-cmd"}, expected: runtime.NumCPU()}, + {name: "negative value is clamped", args: []string{"--concurrency=-1", "test-cmd"}, expected: 1}, + } + + for _, testCase := range testCases { + t.Run(testCase.name, func(t *testing.T) { + app := createTestApp(t) + + ran := false + cmd := &cobra.Command{ + Use: "test-cmd", + RunE: func(cmd *cobra.Command, _ []string) error { + env, err := azldev.GetEnvFromCommand(cmd) + require.NoError(t, err) + + assert.Equal(t, testCase.expected, env.Concurrency()) + assert.Equal(t, testCase.expected, env.CPUBoundConcurrency()) + assert.Equal(t, 2*testCase.expected, env.IOBoundConcurrency()) + assert.Equal(t, 4*testCase.expected, env.FastConcurrency()) + + ran = true + + return nil + }, + } + + app.AddTopLevelCommand(cmd) + + assert.Zero(t, app.Execute(testCase.args)) + assert.True(t, ran) + }) + } +} + func TestApp_WithoutLockfileOption(t *testing.T) { testCases := []struct { name string diff --git a/internal/app/azldev/env.go b/internal/app/azldev/env.go index 55d7c2d67..9b426033f 100644 --- a/internal/app/azldev/env.go +++ b/internal/app/azldev/env.go @@ -77,6 +77,7 @@ type Env struct { quiet bool promptsAllowed bool acceptAllPrompts bool + concurrency int networkRetries int permissiveConfigParsing bool withoutLockfile bool @@ -174,6 +175,7 @@ func NewEnv(ctx context.Context, options EnvOptions) *Env { verbose: false, quiet: false, promptsAllowed: isatty.IsTerminal(os.Stdin.Fd()), + concurrency: defaultConcurrency(), permissiveConfigParsing: false, withoutLockfile: options.WithoutLockfile, @@ -240,6 +242,28 @@ func (env *Env) SetNetworkRetries(retries int) { env.networkRetries = retries } +// Concurrency returns the base concurrency limit used to derive worker counts. +func (env *Env) Concurrency() int { + return env.concurrency +} + +// SetConcurrency sets the base concurrency limit used to derive worker counts. +// A value of zero selects the default logical CPU count. Negative values are +// clamped to 1. +func (env *Env) SetConcurrency(concurrency int) { + if concurrency == 0 { + concurrency = defaultConcurrency() + } else if concurrency < 0 { + concurrency = 1 + } + + env.concurrency = concurrency +} + +func defaultConcurrency() int { + return max(1, runtime.NumCPU()) +} + // PermissiveConfigParsing returns whether permissive parsing of configuration files // is enabled, where unknown fields are ignored instead of causing an error. func (env *Env) PermissiveConfigParsing() bool { @@ -418,22 +442,22 @@ func newLockStore( return lockfile.NewStore(fsFactory.FS(), config.Project.LockDir) } -// CPUBoundConcurrency returns the recommended concurrency limit for CPU-bound tasks. -// Returns [runtime.NumCPU], minimum 1. +// CPUBoundConcurrency returns the concurrency limit for CPU-bound tasks. +// Returns the configured base concurrency, minimum 1. func (env *Env) CPUBoundConcurrency() int { - return max(1, runtime.NumCPU()) + return env.concurrency } // IOBoundConcurrency returns the recommended concurrency limit for I/O-bound tasks -// (network clones, file copies). Returns 2× [runtime.NumCPU], minimum 1. +// (network clones, file copies). Returns 2× the configured base concurrency. func (env *Env) IOBoundConcurrency() int { - return max(1, 2*runtime.NumCPU()) //nolint:mnd // 2x CPU + return 2 * env.concurrency //nolint:mnd // 2x base concurrency } // FastConcurrency returns the recommended concurrency limit for tasks that can benefit from higher parallelism. -// Returns 4× [runtime.NumCPU], minimum 1. +// Returns 4× the configured base concurrency. func (env *Env) FastConcurrency() int { - return max(1, 4*runtime.NumCPU()) //nolint:mnd // 4x CPU + return 4 * env.concurrency //nolint:mnd // 4x base concurrency } // Enables or disables "accept all prompts" mode. diff --git a/internal/app/azldev/env_test.go b/internal/app/azldev/env_test.go index 007e5174e..7aa094960 100644 --- a/internal/app/azldev/env_test.go +++ b/internal/app/azldev/env_test.go @@ -9,6 +9,7 @@ import ( "fmt" "log/slog" "os" + "runtime" "sync" "testing" "time" @@ -72,6 +73,7 @@ func TestNewEnv(t *testing.T) { assert.False(t, env.Quiet()) assert.False(t, env.Verbose()) assert.False(t, env.PermissiveConfigParsing()) + assert.Equal(t, runtime.NumCPU(), env.Concurrency()) // Confirm that our parameters were appropriately wrapped. assert.Equal(t, testProjectRoot, env.ProjectDir()) @@ -111,6 +113,32 @@ func TestSetNetworkRetries(t *testing.T) { } } +func TestSetConcurrency(t *testing.T) { + tests := []struct { + name string + input int + expected int + }{ + {"positive value is preserved", 5, 5}, + {"one is preserved", 1, 1}, + {"zero selects logical CPU count", 0, runtime.NumCPU()}, + {"negative value is clamped to 1", -1, 1}, + {"large negative is clamped to 1", -100, 1}, + } + + for _, testCase := range tests { + t.Run(testCase.name, func(t *testing.T) { + testEnv := testutils.NewTestEnv(t) + testEnv.Env.SetConcurrency(testCase.input) + + assert.Equal(t, testCase.expected, testEnv.Env.Concurrency()) + assert.Equal(t, testCase.expected, testEnv.Env.CPUBoundConcurrency()) + assert.Equal(t, 2*testCase.expected, testEnv.Env.IOBoundConcurrency()) + assert.Equal(t, 4*testCase.expected, testEnv.Env.FastConcurrency()) + }) + } +} + func TestSetPermissiveConfigParsing(t *testing.T) { testEnv := testutils.NewTestEnv(t) diff --git a/scenario/__snapshots__/TestMCPServerMode_1.snap.json b/scenario/__snapshots__/TestMCPServerMode_1.snap.json index 20e599111..b30b1b02b 100755 --- a/scenario/__snapshots__/TestMCPServerMode_1.snap.json +++ b/scenario/__snapshots__/TestMCPServerMode_1.snap.json @@ -35,6 +35,11 @@ "description": "Component group name", "type": "string" }, + "concurrency": { + "default": 0, + "description": "base concurrency limit (default: number of logical CPUs; minimum 1)", + "type": "number" + }, "config-file": { "description": "additional TOML config file(s) to merge (may be repeated)", "type": "string" @@ -142,6 +147,11 @@ "description": "Component group name", "type": "string" }, + "concurrency": { + "default": 0, + "description": "base concurrency limit (default: number of logical CPUs; minimum 1)", + "type": "number" + }, "config-file": { "description": "additional TOML config file(s) to merge (may be repeated)", "type": "string" @@ -242,6 +252,11 @@ "description": "Component group name", "type": "string" }, + "concurrency": { + "default": 0, + "description": "base concurrency limit (default: number of logical CPUs; minimum 1)", + "type": "number" + }, "config-file": { "description": "additional TOML config file(s) to merge (may be repeated)", "type": "string" @@ -342,6 +357,11 @@ "description": "Component group name", "type": "string" }, + "concurrency": { + "default": 0, + "description": "base concurrency limit (default: number of logical CPUs; minimum 1)", + "type": "number" + }, "config-file": { "description": "additional TOML config file(s) to merge (may be repeated)", "type": "string" @@ -419,6 +439,11 @@ "description": "output colorization mode {always, auto, never}", "type": "string" }, + "concurrency": { + "default": 0, + "description": "base concurrency limit (default: number of logical CPUs; minimum 1)", + "type": "number" + }, "config-file": { "description": "additional TOML config file(s) to merge (may be repeated)", "type": "string" @@ -496,6 +521,11 @@ "description": "output colorization mode {always, auto, never}", "type": "string" }, + "concurrency": { + "default": 0, + "description": "base concurrency limit (default: number of logical CPUs; minimum 1)", + "type": "number" + }, "config-file": { "description": "additional TOML config file(s) to merge (may be repeated)", "type": "string" @@ -569,6 +599,11 @@ "description": "output colorization mode {always, auto, never}", "type": "string" }, + "concurrency": { + "default": 0, + "description": "base concurrency limit (default: number of logical CPUs; minimum 1)", + "type": "number" + }, "config-file": { "description": "additional TOML config file(s) to merge (may be repeated)", "type": "string" @@ -647,6 +682,11 @@ "description": "output colorization mode {always, auto, never}", "type": "string" }, + "concurrency": { + "default": 0, + "description": "base concurrency limit (default: number of logical CPUs; minimum 1)", + "type": "number" + }, "config-file": { "description": "additional TOML config file(s) to merge (may be repeated)", "type": "string" @@ -737,6 +777,11 @@ "description": "output colorization mode {always, auto, never}", "type": "string" }, + "concurrency": { + "default": 0, + "description": "base concurrency limit (default: number of logical CPUs; minimum 1)", + "type": "number" + }, "config-file": { "description": "additional TOML config file(s) to merge (may be repeated)", "type": "string" @@ -815,6 +860,11 @@ "description": "output colorization mode {always, auto, never}", "type": "string" }, + "concurrency": { + "default": 0, + "description": "base concurrency limit (default: number of logical CPUs; minimum 1)", + "type": "number" + }, "config-file": { "description": "additional TOML config file(s) to merge (may be repeated)", "type": "string" diff --git a/scenario/__snapshots__/TestSnapshotsContainer_--bogus-flag_stderr_1.snap b/scenario/__snapshots__/TestSnapshotsContainer_--bogus-flag_stderr_1.snap index 5d4be54da..6832b09a4 100755 --- a/scenario/__snapshots__/TestSnapshotsContainer_--bogus-flag_stderr_1.snap +++ b/scenario/__snapshots__/TestSnapshotsContainer_--bogus-flag_stderr_1.snap @@ -19,6 +19,7 @@ Meta commands: Flags: -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) -h, --help help for azldev diff --git a/scenario/__snapshots__/TestSnapshotsContainer_--help_stdout_1.snap b/scenario/__snapshots__/TestSnapshotsContainer_--help_stdout_1.snap index 2ef8a077c..e15aef19c 100755 --- a/scenario/__snapshots__/TestSnapshotsContainer_--help_stdout_1.snap +++ b/scenario/__snapshots__/TestSnapshotsContainer_--help_stdout_1.snap @@ -26,6 +26,7 @@ Meta commands: Flags: -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) -h, --help help for azldev diff --git a/scenario/__snapshots__/TestSnapshotsContainer_help_stdout_1.snap b/scenario/__snapshots__/TestSnapshotsContainer_help_stdout_1.snap index 2ef8a077c..e15aef19c 100755 --- a/scenario/__snapshots__/TestSnapshotsContainer_help_stdout_1.snap +++ b/scenario/__snapshots__/TestSnapshotsContainer_help_stdout_1.snap @@ -26,6 +26,7 @@ Meta commands: Flags: -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) -h, --help help for azldev diff --git a/scenario/__snapshots__/TestSnapshots_--bogus-flag_stderr_1.snap b/scenario/__snapshots__/TestSnapshots_--bogus-flag_stderr_1.snap index 5d4be54da..6832b09a4 100755 --- a/scenario/__snapshots__/TestSnapshots_--bogus-flag_stderr_1.snap +++ b/scenario/__snapshots__/TestSnapshots_--bogus-flag_stderr_1.snap @@ -19,6 +19,7 @@ Meta commands: Flags: -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) -h, --help help for azldev diff --git a/scenario/__snapshots__/TestSnapshots_--help_stdout_1.snap b/scenario/__snapshots__/TestSnapshots_--help_stdout_1.snap index 2ef8a077c..e15aef19c 100755 --- a/scenario/__snapshots__/TestSnapshots_--help_stdout_1.snap +++ b/scenario/__snapshots__/TestSnapshots_--help_stdout_1.snap @@ -26,6 +26,7 @@ Meta commands: Flags: -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) -h, --help help for azldev diff --git a/scenario/__snapshots__/TestSnapshots_--help_with_color_stdout_1.snap b/scenario/__snapshots__/TestSnapshots_--help_with_color_stdout_1.snap index 4c6577938..4a47c31e2 100755 --- a/scenario/__snapshots__/TestSnapshots_--help_with_color_stdout_1.snap +++ b/scenario/__snapshots__/TestSnapshots_--help_with_color_stdout_1.snap @@ -26,6 +26,7 @@ Meta commands: Flags: -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) -h, --help help for azldev diff --git a/scenario/__snapshots__/TestSnapshots_help_stdout_1.snap b/scenario/__snapshots__/TestSnapshots_help_stdout_1.snap index 2ef8a077c..e15aef19c 100755 --- a/scenario/__snapshots__/TestSnapshots_help_stdout_1.snap +++ b/scenario/__snapshots__/TestSnapshots_help_stdout_1.snap @@ -26,6 +26,7 @@ Meta commands: Flags: -y, --accept-all accept all prompts --color mode output colorization mode {always, auto, never} (default auto) + --concurrency int base concurrency limit (default: number of logical CPUs; minimum 1) --config-file stringArray additional TOML config file(s) to merge (may be repeated) -n, --dry-run dry run only (do not take action) -h, --help help for azldev