Summary
With Tower CLI 0.36.0, Azure Batch Forge dual-pool autoscaling is not explicitly enabled when the autoscale-disable flags are omitted. This can create fixed-size head and worker pools that remain at their configured VM counts instead of scaling down when idle.
The CLI help presents these as disable flags:
--head-no-auto-scale Disable autoscaling for the head pool
--worker-no-auto-scale Disable autoscaling for the worker pool
That implies autoscaling is enabled by default when they are absent. However, the current implementation appears to serialize each pool's autoScale field only when the corresponding nullable negative option is explicitly assigned. Otherwise it sends null/omits the field.
Reproduction
Create an Azure Batch Forge dual-pool compute environment without either disable flag:
tw compute-envs add azure-batch forge \
--name example \
--location eastus \
--work-dir az://example \
--dual-pool \
--head-vm-count 8 \
--worker-vm-count 32
Observe that the resulting pools can remain fixed at 8 head nodes and 32 worker nodes rather than treating those values as autoscaling maximums and scaling down when idle.
Current workaround
Explicit Boolean assignment enables autoscaling:
--head-no-auto-scale=false \
--worker-no-auto-scale=false
This works, but the double negative is confusing, is not shown in --help, and is awkward for configuration wrappers that model Boolean flags by presence.
Expected behavior
One or both of the following would make the behavior clear and reliable:
- When the dual-pool disable flags are omitted, explicitly serialize
headPool.autoScale=true and workerPool.autoScale=true, matching the documented default.
- Expose positive negatable options such as
--[no-]head-auto-scale and --[no-]worker-auto-scale, while retaining the existing negative flags as backward-compatible aliases.
Please also add request-payload tests covering:
- Default dual-pool creation serializes
autoScale: true for both pools.
- Explicitly disabling head or worker autoscaling serializes
autoScale: false for that pool.
Version
Tower CLI version 0.36.0 (build b8e8b32)
The same nullable dual-pool mapping is also present in the current master implementation at the time of filing.
Summary
With Tower CLI 0.36.0, Azure Batch Forge dual-pool autoscaling is not explicitly enabled when the autoscale-disable flags are omitted. This can create fixed-size head and worker pools that remain at their configured VM counts instead of scaling down when idle.
The CLI help presents these as disable flags:
That implies autoscaling is enabled by default when they are absent. However, the current implementation appears to serialize each pool's
autoScalefield only when the corresponding nullable negative option is explicitly assigned. Otherwise it sendsnull/omits the field.Reproduction
Create an Azure Batch Forge dual-pool compute environment without either disable flag:
Observe that the resulting pools can remain fixed at 8 head nodes and 32 worker nodes rather than treating those values as autoscaling maximums and scaling down when idle.
Current workaround
Explicit Boolean assignment enables autoscaling:
This works, but the double negative is confusing, is not shown in
--help, and is awkward for configuration wrappers that model Boolean flags by presence.Expected behavior
One or both of the following would make the behavior clear and reliable:
headPool.autoScale=trueandworkerPool.autoScale=true, matching the documented default.--[no-]head-auto-scaleand--[no-]worker-auto-scale, while retaining the existing negative flags as backward-compatible aliases.Please also add request-payload tests covering:
autoScale: truefor both pools.autoScale: falsefor that pool.Version
The same nullable dual-pool mapping is also present in the current
masterimplementation at the time of filing.