CesiumGS / cesium-unity

Bringing the 3D geospatial ecosystem to Unity
https://cesium.com/platform/cesium-for-unity/
Apache License 2.0
347 stars 83 forks source link

Fix CI failures due to Unity licensing timeout #374

Open kring opened 11 months ago

kring commented 11 months ago

We often see CI builds fail because Unity is unable to get a license. For example, this build failed 12 times in a row: https://github.com/CesiumGS/cesium-unity/actions/runs/6646235227

As far as I can tell, our Unity licensing server and the build agent's connection to it are working perfectly. The problem is that Unity itself is running extremely slowly as AWS trickles the bytes down from S3 on a fresh VM, and so it takes more than 2 minutes for Unity to manage to actually complete the connection. Two minutes is the maximum timeout that Unity allows (even when you specify a timeout, you're not allowed to specify a value longer than this, for no apparent reason), and so when it takes longer than that, the build fails.

More details about the initially-slow game engine performance on build machines can be found here: https://github.com/CesiumGS/cesium-unreal/issues/1192

I think the only solution (short of somehow fixing https://github.com/CesiumGS/cesium-unreal/issues/1192) is to make the Unity build retry when there's a licensing failure. The second attempt should be drastically faster because the necessary data will have been streamed down from S3 by then.