Support concurrency alias in configuration

What does this MR do?

Adds support for concurrency as an accepted TOML configuration alias for concurrent at the global level and limit at the [[runners]] level in config.toml.

Why was this MR needed?

In documentation and discussions, GitLab CI concurrency is widely referred to as "concurrency" (and within [[runners]], the setting is request_concurrency). Consequently, operators frequently write concurrency = 1 in config.toml expecting it to enforce single-job execution.

Previously, BurntSushi/toml only matched the strict struct tags (concurrent on Config and limit on RunnerConfig), silently discarding any concurrency setting. This left limit at its zero value (0, meaning unlimited), causing runners to pick up and process multiple builds in parallel when limit = 1 was intended.

Mapping concurrency to Concurrent globally (when concurrent is unset) and to Limit per runner (when limit is unset) eliminates this failure mode while preserving full backward compatibility for canonical configuration fields.

What's the best way to test this MR?

Run the new table-driven unit test suite:

go test -v ./common -run '^TestLoadConfig_ConcurrencyAlias$'

What are the relevant issue numbers?

Related to #4793

Edited by Manish Kumar

Merge request reports

Loading
Loading