MaxParallelActions discrepancy between UbaControllerModule and UnrealBuildTool

BuildConfiguration.cs in UnrealBuildTool states that if MaxParallelActions is zero a default will be determined based on core count and memory available.

That appears to be the case in C# land where GetMaxActionsToExecuteInParallel determines this.

However, on the C++ side in the UbaController module it appears to be using -1, not 0, as the sentinel value to determine if it defaults to core count and memory available. Since BuildConfiguration defaults to zero this has the effect of disabling local workers if you leave it at default value.

[Attachment Removed]

Interesting. Is this for shader compiling? Bringing in [mention removed]​

[Attachment Removed]

My understanding is that so far the UbaControllerModule on the C++ side is only handling shader compiling. AFAIK.

It’s invoked at the very least during cooking and I only see it being used for shaders in that context.

[Attachment Removed]

Hi Robert, thanks for pointing this out. You’re right, these should match but the C++ module for shader compilation uses -1 as special value to let the client pick the highest available number of local CPU cores while the C# module for C++ compilation uses 0 as special value. The reasoning behind using -1 was to let a value of 0 disable the local workers entirely and solely use remote execution. I will create a Jira task to make these behave the same.

[Attachment Removed]

FYI, the JIRA was created (UE-370058). Closing this ticket.

[Attachment Removed]