When deploying a service to multiple infrastructure definitions within the same environment in parallel, the Resource Constraint incorrectly serializes the deployments by queuing one behind the other.
Even though the infrastructures are completely distinct.
Current behavior:
The Resource Constraint scopes its concurrency lock at service + environment level.
As a result, two deployments targeting different infra definitions in the same environment are treated as competing for the same slot, and one is held in queue until the other completes.
Expected behavior:
The Resource Constraint should scope its lock at service + environment + infrastructure level, so that deployments to distinct infrastructure definitions within the same environment can proceed in parallel as configured.
Steps to reproduce:
Configure a pipeline with a multi-infrastructure deployment stage with parallel execution enabled
Use two or more infrastructure definitions scoped to the same environment
Trigger a deployment and observe that one infra's stage is queued behind the other at the Resource Constraint step
Impact:
This directly undermines the parallel execution setting in multi-infrastructure deployments and adds unnecessary deployment time, particularly in environments with multiple target hosts or infra definitions.