Hi,
we are testing Horde-managed UBA cache in our UE5 source build and ran into a behavior we wanted to clarify.
Our setup uses the Horde UBA cache provider. UBT requests a cache session from Horde via:
POST /api/v2/compute/{clusterId}/uba-cache
Horde then calls the UBA cache service HTTP management endpoint, roughly:
http://<cacheHttpEndpoint>/addsession?..
If the UbaCacheService is unavailable, or the configured HTTP management endpoint returns an error (for example 404/connection refused/timeout), the exception currently propagates back to UBT as a ComputeClientException and fails the whole build during UBA executor initialization.
Example callstack:
UBAHordeSession.RequestCacheServer()
ServerComputeClient.AllocateUbaCacheServerAsync()
ComputeService.AllocateUbaCacheServerAsync()
HttpResponseMessage.EnsureSuccessStatusCode()
-> ComputeServiceException: Unexpected error during UBA cache server allocation
We would like to understand the intended design here.
Was it intentional that a failure to allocate a UBA cache session should fail the whole build? Or is the UBA cache expected to be treated as an optional performance optimization, where the build should continue without cache if the cache service is unavailable?
From our perspective, the latter behavior would be preferable for production CI: if the cache is unavailable, builds should still compile locally/remotely without cache, just slower. Failing the build because the optional cache service is down makes the cache a critical dependency.
As an experiment, we added a cluster-level config option, conceptually:
plugins.compute.clusters[].uba.cacheFailOpen = true
The behavior we implemented is:
- Keep the existing validation behavior for missing UBA cache config.
- Keep the existing authorization behavior for missing UbaCacheRead/UbaCacheWrite ACL.
- During UBA cache session allocation, if an exception occurs while generating/registering the cache session or calling the cache service management endpoint:
- log a warning on the Horde server,
- return an empty/no-cache UBA resource,
- let the build continue without attaching UBA cache config to the compute resource.
- Do not swallow actual request/build cancellation.
In simplified form, the server-side idea is:
try
{
// existing UBA cache session allocation
// generate session key
// call http://<cacheHttpEndpoint>/addsession
// return UbaComputeResource(cacheEndpoint, sessionKey, writeAccess)
}
catch (TaskCanceledException ex)
{
if (cacheFailOpen && !cancellationToken.IsCancellationRequested)
{
LogWarning(...);
return empty/no\-cache UBA resource;
}
throw;
}
catch (Exception ex)
{
if (cacheFailOpen)
{
LogWarning(...);
return empty/no\-cache UBA resource;
}
throw;
}
At the compute allocation call site, if the returned UBA resource has an empty cache endpoint, we do not attach it to the compute resource, so the client proceeds without UBA cache.
Does this approach match the intended architecture of Horde-managed UBA cache? Would you recommend handling this fail-open behavior in Horde server, in UBT/UBAHordeSession client code, or somewhere else?
Thanks!
Lubos Suk
[Attachment Removed]