feat: add DEFAULT_MAX_CONCURRENT_EXECUTION for the batch default

SA
1d ago
+14-5

The SDK's default batch concurrency, 5, is now DEFAULT_MAX_CONCURRENT_EXECUTION in infrahub_sdk.constants. InfrahubBatch, InfrahubBatchSync and the max_concurrent_execution field of Config use it as their default instead of three separate literal 5s. The value, the signatures and the INFRAHUB_MAX_CONCURRENT_EXECUTION environment override are unchanged.

Code that receives an optional concurrency value can now pass the constant when the value is None, instead of building the batch in two branches. This was asked for in a review of opsmill/infrahub#10113, where _apply_migration_batch does exactly that. Removing that conditional in Infrahub needs an SDK release with this constant and a python_sdk bump, so it is not part of this PR. The constant is not re-exported from infrahub_sdk/__init__.py, which exports only the client and Config; it sits next to InfrahubClientMode and Priority. infrahubctl dump keeps its own default of 4.

The change adds no tests: review questioned the ones it had, and they compared the defaults with 5, so they would not have caught a literal 5 coming back. Full unit suite: 3,148 passed, 2 skipped, 1 xfailed. invoke format, invoke lint (with Vale 3.7.1) and invoke docs-validate pass. Tracked as INBOX-171.

🤖 Generated with Claude Code