UBA Shader Compiles using .ini-specified Cluster

(see repro steps for details)

When specifying something other than “_auto” for Cluster in DefaultEngine.ini, FUbaHordeAgentManager will use the default value of FClusterInfo.ClusterId which is “default” rather than the user-specified configuration value.

Lots of ways to fix this. Here is one:

==== //uf/lyra-56/Engine/Source/Developer/UbaCoordinatorHorde/Private/UbaHordeAgentManager.cpp#2 (text) ====
 
[Content removed]9 @@
 			ClusterInfo = Future.Get().Value;
 			UE_CLOG(!ClusterInfo.ClusterId.IsEmpty(), LogUbaHorde, Verbose, TEXT("Received resolved cluster ID from Horde: %s"), *ClusterInfo.ClusterId);
 		}
+		else {
+			ClusterInfo.ClusterId = Config.HordeCluster;
+		}
 
 		// Request Horde machine for UBA agent
 		TSharedPtr<FUbaHordeMetaClient::HordeMachinePromise, ESPMode::ThreadSafe> Promise = HordeMetaClient->RequestMachine(HordeRequestJsonBody, *ClusterInfo.ClusterId);

Just looking to confirm this looks like a good/safe change to make before we roll it out.

Steps to Reproduce
1. In DefaultEngine.ini, specify a UBA provider with a custom Cluster:

[Uba.Provider.Horde.UniversalFoundry]
ServerUrl=<Your Horde Server URL>
Enabled=True

Cluster=developer
Encryption=aes
MaxCores=256

2. In %LocalAppData%\Unreal Engine\Engine\Config\UserEngine.ini add a UbaController section:

[UbaController]
Providers=Uba.Provider.Horde.UniversalFoundry

3. Launch the editor

In the logs, you’ll see shader compilation try and fail to use the cluster “default” rather than “developer” as specified in DefaultEngine.ini.

I appologize for the late response. I totally missed this one. And even worse, I don’t know these things well. I will pull in my colleague [mention removed]​ for this one

Thank you Albert for bringing this to our attention, this is indeed a good solution. I can integrate this into our 5.7 release stream.

We use this internally only with the `_auto` cluster, so this issue hasn’t come up yet.

Best regards

Laura