38 Commits

Author SHA1 Message Date
steve robb
6d5b974842 Fixed up a lot of bool-taking container resize functions to take EAllowShrinking instead.
[CL 30735396 by steve robb in ue5-main branch]
2024-01-19 19:41:56 -05:00
marc audy
40118bf525 Silence warnings
[CL 30444877 by marc audy in ue5-main branch]
2023-12-22 17:21:37 -05:00
kirill zorin
b6ee3a6c64 Fix UE_LOG callsites that have format string-related UB
#rb trivial
#preflight 647107780a6634dbb236a0a6

[CL 25651638 by kirill zorin in ue5-main branch]
2023-05-26 15:52:39 -04:00
paul chipchase
fa35ec4043 Add a new console command 'ValidatePackagePayloads' as a quick way to check the status of payloads in a package.
#rb none
#jira none
#rnx
#preflight 646492502d446eac96a6fff9

- Each payload in the package is loaded or pulled and checked to make sure that it:
-- Could be accessed.
-- The hash stored in the FCompressedBuffer is the same as the original requested hash.
-- That the payload can be decompressed.
-- That the decompressed payload when hashed has the same hash as the original request.
- This should catch cases where the payload cannot be found or is corrupted in some way.

[CL 25503830 by paul chipchase in ue5-main branch]
2023-05-17 04:53:43 -04:00
paul chipchase
54b51c99e3 Fix some typos in code documentation
#rb trivial
#jira none
#rnx
#preflight 6461dc5ab87b09aadddc17c8

[CL 25470354 by paul chipchase in ue5-main branch]
2023-05-15 04:03:12 -04:00
paul chipchase
fdf6f97cfc Allow the output of the GeneratePayloadManifest commandlet to be spit up over multiple csv files if it gets too large.
#rb trivial
#jira none
#preflight 645cc3cc2965f6ea8e81cfab

- If a project contained too many packages the final .csv output file might be too large to import into some spread sheet systems, in these cases we need to split the output into multiple smaller .csv files.
- The output is now sent to its own subdirectory under saved, ''/payloadmanifest/"
- When done the commandlet will report the file path of each .csv written to disk
- Add the number of payloads discovered to the final output summary.

[CL 25424197 by paul chipchase in ue5-main branch]
2023-05-11 06:50:09 -04:00
paul chipchase
b96e6b41da Add a new cmdline parameter '-LocalOnly' to the 'GeneratePayloadManifest commandlet. When used only payloads that are still stored locally will be added to the manifest.
#rb trivial
#jira none
#preflight 645ca98ccf788a2558b003ef

[CL 25423192 by paul chipchase in ue5-main branch]
2023-05-11 04:51:23 -04:00
paul chipchase
73d6b003e8 Allow the virtualize and rehydrate project commandlets to work on specific directories if requested.
#rb none
#jira UE-178523
#preflight 6437a727d03b1c87ddf5ca15

- The commandlets now accept '-PackageDir=' and '-PackageFolder=' commnad line args.

[CL 25021806 by paul chipchase in ue5-main branch]
2023-04-13 03:44:12 -04:00
paul chipchase
c6b707f171 Add a new cmdline option '-ValidateContent' to the 'ValidateVirtualizedContent commandlet
#rb none
#jira UE-182196
#rnx
#preflight 642d2b1389339023eb66b663

- The new cmdline option will download each payload and make sure that the data is correct in addition to checking that the payload exists.
- Note: There is no way to control which backend returns the payload so the VA graph, or cmdline parameters would need to be changed be the caller to make sure they are checking the backend that they are interested in.
-- This new option is fairly slow and is intended to be used as part of an automated checking system rather than by users themselves, so needing to change the graph and running the commandlet once per backend that needs testing shouldn't be too hard to do.

[CL 24924696 by paul chipchase in ue5-main branch]
2023-04-05 04:22:43 -04:00
paul chipchase
1619183e14 Factor out the multithreaded pull system from PrecachePayloadsCommandlet to the general utilities so that other VA commandlets can make use of it.
#rb trivial
#jira UE-182196
#rnx
#preflight 642c20f5d6069e71b1f39f80

[CL 24909424 by paul chipchase in ue5-main branch]
2023-04-04 09:16:58 -04:00
paul chipchase
9b96e61b1b Move some comon functionality from UPrecachePayloadsCommandlet to the general utilities so that other commandlets can use it.
#rb trivial
#jira UE-182196
#rnx
#preflight 642bff7689339023ebf971fa

[CL 24908348 by paul chipchase in ue5-main branch]
2023-04-04 07:05:12 -04:00
paul chipchase
b4d5ca8fbb Improve the VA PrecachePayloads commandlet
#rb none
#rnx
#preflight 641c01e2a6092dfb8dfa1478

- The previous default iteration mode could saturdate the worker threads, which would prevent the Zen DDC backend from running clean up code resulting in very large memory spikes.
- We now launch a limited number of tasks that process a limited number of payloads before completing. Once a task is finsihed we issue another until there is no more work to do.
- This seems to strike a good balance of keeping the network transfer at peak speed but allowing other systems time on the cpu.
- Removed all the experimental iteration modes and going all in on this solution, which makes the code easier to parse.

[CL 24759860 by paul chipchase in ue5-main branch]
2023-03-23 07:02:27 -04:00
paul chipchase
6a7f58fedf Fix a typo in the VA commandlet documentation.
#rb trivial
#jira none
#rnx
#preflight 640b3ef2d778f88975290bdb

[CL 24591048 by paul chipchase in ue5-main branch]
2023-03-10 09:43:59 -05:00
paul chipchase
425e201624 Improve VA commandlet documentation to avoid problems when people invoke them via powershell.
#rb trivial
#jira none
#rnx
#preflight 640adf1eaf3fc352929322a9

- When a tester tried '-run=VirtualizationEditor.???' via powershell a spece was added so the editor got '-run=VirtualizationEditor .???' which doesn't parse correctly.
- Change the documentation to suggest using '-run="VirtualizationEditor.???"' so that the original text is preserved.

[CL 24588709 by paul chipchase in ue5-main branch]
2023-03-10 02:56:22 -05:00
paul chipchase
9e48b8d00b Fix the 'CheckForVirtualizedContent ' commandlet to be able to check engine content once again.
#rb none
#jira UE-174785
#rnx
#preflight 63ff0ceeae54ee4ce912c17c

- Recently how we discover packages for the VA commandlets was changed to be much faster but it was also changed to automatically filter out all engine content as we removed the optional (opt in) feature of virtualizing engine content.
- This meant that 'CheckForVirtualizedContent' would not be able to check engine packages if '-CheckEngine' was set as we were not providing the commandlet with them.
- ::FindAllPackages has been renamed ::FindPackages and both it and ::DiscoverPackages now accept a flags parameter that allows the caller to request that engine content be excluded.
- Although most commandlets do not want engine content, having the engine content filter as opt in closer matches existing apis and will probably lead to less mistakes.

[CL 24459148 by paul chipchase in ue5-main branch]
2023-03-01 03:47:24 -05:00
paul chipchase
4a9de4ab1b The VA commandlet 'ValidateVirtualizedContent' now iterates over all packages in a project and makes sure that any virtualized payloads encountered can be found in persistent storage. The original version of this commandlet has been renamed to 'CheckForVirtualizedContent' and continues to be used to make sure that virtualized packages do not get submitted to places that they should not.
#rb trivial
#jira UE-176611
#preflight 63fe18fcf43e53f68189d869

- Renamed UValidateVirtualizedContentCommandlet to UCheckForVirtualizedContentCommandlet. P4 rename was not done because I wanted to repurpose UValidateVirtualizedContentCommandlet and adding new versions of the code files after renaming them is likely to cause weird p4 merge issues in the future.

[CL 24442899 by paul chipchase in ue5-main branch]
2023-02-28 10:48:04 -05:00
paul chipchase
ea9afe6a78 Add '-AutoCheckIn' cmdline option to the Virtualize/Rehydrate project commandlets.
#rb trivial
#jira UE-178518
#preflight 63fcb6f560163ed3c22e3d35

- The option will only checkin packages that were checked out by the commandlet. Local files or packages that were already open for edit will not be submitted.

[CL 24422913 by paul chipchase in ue5-main branch]
2023-02-27 09:34:47 -05:00
paul chipchase
5b0faa30ca Speed up package discovery for VA commandlets.
#rb Per.Larsson
#jira UE-167454
#rnx
#preflight 63f5e5b9ac06ce789f047431

- Replace use of ::NormalizePackageNames with the asset registry for finding packages.
- We can use the async version of SearchAllAssets so that we don't have to wait on the asset registry cache being saved to disk.
- ::FindAllPackages now returns all paths in our standard form (relative to Engine\Binaries\<Platform>) where as NormalizePackageNames would return a mix of formats depending on the mount point location.

[CL 24359197 by paul chipchase in ue5-main branch]
2023-02-22 07:39:51 -05:00
paul chipchase
aeea97a14a Virtualization commandlets now exclude engine packages.
#rb trivial
#jira UE-177015
#preflight 63eb87720a06073fef3110dd

- In CL 24208899 we removed the option to virtualize engine content which means that the virtualization commandlets can use NORMALIZE_ExcludeEnginePackages when searching for packages.
- This helps make our logging a bit more readable, for example if someone were to run the virtualize project commandlet on a new project containing only a single package we will no longer return the number of engine packages + 1 when reporting how many packages are being considered for virtualization. This should help the user to have more confidence in the numbers that we are reporting.

[CL 24209315 by paul chipchase in ue5-main branch]
2023-02-14 08:14:57 -05:00
paul chipchase
fddb6bf0c6 Improve code documentation for the VA PrecachePayloads commandlet.
#rb trivial
#jira none
#rnx
#preflight 63da305f8c7003aa8c7fdc92

[CL 23945502 by paul chipchase in ue5-main branch]
2023-02-01 04:47:13 -05:00
paul chipchase
90e67c80bf Add a commandlet -run=VirtualizationEditor.ValidateVirtualizedContent to validate that the engine/project/directory does not contain virtualized data
#rb Per.Larsson
#jira UE-174785
#rnx
#preflight 63d3d027f6267152017a68dd

- There are some circumstances where we want to be sure that locations do not contain virtualized data. As an example we were to accidently virtualize an engine package and then distribute that with an engine release it will not work for people. This commandlet is designed to be run as part of a CIS to detect this sort of thing and raise errors so that they can be corrected.
- We support three forms of validation
-- '-CheckEngine' which errors if the engine or its plugins contain virtualized data
-- '-CheckProject' which errors if the current project or its plugins contain virtualized data
-- '-CheckDir' which errors if the given directory or its subdirectories contain virtualized data. More than one path can be supplied by using '+' as the delimiter.

[CL 23905198 by paul chipchase in ue5-main branch]
2023-01-30 04:56:40 -05:00
paul chipchase
81c3b7f300 Add a new commandlet for rehydrating an entire project.
#rb Per.Larsson
#jira UE-172167
#rnx
#preflight 63c649b50225f00e1466bf92

- Cmdline to use '-run=VirtualizationEditor.RehydrateProject'.
- The commandlet will first scan the project to find all packages (.uasset/.umap) and then attempt to rehydrate them.
- If revision control is enabled then virtualized packages will be checked out using the current settings for the project (so things like -P4Changelist= will work)

[CL 23735823 by paul chipchase in ue5-main branch]
2023-01-17 04:20:27 -05:00
paul chipchase
bfe122f342 Add a new commandlet for virtualizing an entire project.
#rb Per.Larsson
#jira UE-172166
#rnx
#preflight 63c64982d040694ab83efdd1

- Cmdline to use '-run=VirtualizationEditor.VirtualizeProject'.
- The commandlet will first scan the project to find all packages (.uasset/.umap) and then attempt to virtualize them.
- If revision control is enabled then virtualized packages will be checked out using the current settings for the project (so things like -P4Changelist= will work)

[CL 23735820 by paul chipchase in ue5-main branch]
2023-01-17 04:19:43 -05:00
paul chipchase
c0c170b63d Rename virtualization commandlet files to a more standard naming convention.
#rb Sebastian.Nordgren
#rnx
#preflight 63c120f370575f890018a069

[CL 23675497 by paul chipchase in ue5-main branch]
2023-01-13 04:29:19 -05:00
paul chipchase
2566e67f35 Move some common commandlet code to a utility file so that the virtualization commandlets can share.
#rb Sebastian.Nordgren
#rnx
#preflight 63c11303305002c641cda826

[CL 23675149 by paul chipchase in ue5-main branch]
2023-01-13 03:31:00 -05:00