Fix the virtualization config option 'EnablePushToBackend' to no longer produce submission errors when disabled.

#rb PJ.Kack
#rnx
#jira UE-140366
#preflight 61f2a6f752396dbfeeede332

- Add a way to poll the virtualization system to see if pushing to a backend storage type is possible or not.
- If we cannot push to persistent backend storage when submitting packages to source control we just log in verbose mode and return rather than giving an error. Submitting a non-virtualized package is no longer the problem it once was.

#ROBOMERGE-AUTHOR: paul.chipchase
#ROBOMERGE-SOURCE: CL 18769119 in //UE5/Release-5.0/... via CL 18769125 via CL 18769151
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18769154 by paul chipchase in ue5-main branch]
This commit is contained in:
paul chipchase
2022-01-28 03:48:55 -05:00
parent ccba804191
commit eef8bafac9
5 changed files with 39 additions and 0 deletions

View File

@@ -142,6 +142,12 @@ void OnPrePackageSubmission(const TArray<FString>& FilesToSubmit, TArray<FText>&
return;
}
if (!System.IsPushingEnabled(EStorageType::Persistent))
{
UE_LOG(LogVirtualization, Verbose, TEXT("Pushing to persistent backend storage is disabled"));
return;
}
const double StartTime = FPlatformTime::Seconds();
// Other systems may have added errors to this array, we need to check so later we can determine if this function added any additional errors.

View File

@@ -288,6 +288,30 @@ bool FVirtualizationManager::IsEnabled() const
return !AllBackends.IsEmpty();
}
bool FVirtualizationManager::IsPushingEnabled(EStorageType StorageType) const
{
if (!bEnablePayloadPushing)
{
return false;
}
switch (StorageType)
{
case EStorageType::Local:
return !LocalCachableBackends.IsEmpty();
break;
case EStorageType::Persistent:
return !PersistentStorageBackends.IsEmpty();
break;
default:
checkNoEntry();
return false;
break;
}
}
bool FVirtualizationManager::PushData(const FPayloadId& Id, const FCompressedBuffer& Payload, EStorageType StorageType, const FString& Context)
{
FPushRequest Request(Id, Payload, Context);

View File

@@ -92,6 +92,7 @@ private:
/* IVirtualizationSystem implementation */
virtual bool IsEnabled() const override;
virtual bool IsPushingEnabled(EStorageType StorageType) const override;
virtual bool PushData(const FPayloadId& Id, const FCompressedBuffer& Payload, EStorageType StorageType, const FString& Context) override;
virtual bool PushData(TArrayView<FPushRequest> Requests, EStorageType StorageType) override;