Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Having issues getting Accelerator to work with an Atlassian Bamboo build server

Discussion in 'Unity Accelerator' started by myke-synnett, Apr 3, 2023.

  1. myke-synnett

    myke-synnett

    Joined:
    Jan 8, 2019
    Posts:
    4
    Hello all,

    So I'm trying to set up the Unity Accelerator to work with my Atlassian Bamboo build server but keep hitting a wall and I'm not sure what I'm doing wrong or how to address it.
    Currently if the Accelerator is turned on, all my builds fail in the unity auto build phase. But if the Accelerator is off, everything works fine and all builds complete successfully. So clearly the Accelerator isn't configured properly or something with it is off at least. I've even looked through my bamboo log files for the failed builds and can't come to any conclusion that points to the Accelerator. What I do know is that I have the latest version of the Accelerator installed and running on my build server which is on the latest version of macOS with all the latest versions of the Bamboo and other software I use for the build server. All my projects are on Unity 2021.X or higher too, so they should all benefit from the Accelerator if I understand Unity's documentation (which should honestly be updated because some of it is really out of date). I also have Accelerator turned on and connected in Unity on the build server as well, and all settings regarding storage space options for the cached files are set as well. Yet for whatever reason when I kick off a build with the Accelerator on it always fails. And looking at the Accelerator web dashboard it states that nothing has been cached at all. I'm not sure if I'm missing something or what? I'm essentially just trying to use Unity Accelerator as a cache server in hopes to speed up the build process. I know Unity has Unity Cache Server, but since all my project are on version 2021.X or above Unity states I need to use the Accelerator instead of the Cache Server app, but the official Unity documentation on how to set Accelerator up as a cache server running on 1 machine outside of a local network is lacking at best. My company is completely remote, with our servers located at the owners residence. So there is no way to setup a local network as Unity describes in their documentation. Instead I want to set up Accelerator on my 1 machine, in this case our build server, and just have it run as a cache server for the different projects we have so that, again, hopefully our build times can be a little quicker thus saving people time. All that said, what's the best place to start looking for instructions or documentation that will help me achieve this?
     
  2. unity_Jonny

    unity_Jonny

    Unity Technologies

    Joined:
    Feb 11, 2020
    Posts:
    22
    Hi, sorry about the documentation issues, I am working on updating those and hope to get some updates out soon.

    For your build issues, if you have different versions of Unity on the same project trying to upload/download to/from the same Accelerator, it would be a good idea to segregate the different Unity versions using different cache namespaces (in the Editor Project Settings, or the command line arg -cacheServerNamespacePrefix my_prefix). So, you could have namespace prefixes 'myProjA_2021.3', 'myProjA_2022.1', 'myProjB_2021.3'.

    Also, you say the build is failing - what is the failure? Failures like this caused by the cache sound a bit like having 2 Unity versions hashing the same asset to a different result, but it gets the same hash, so to the Accelerator it looks like the same, but internally its changed between versions. This usually happens when some property has been added or removed from some asset, but the asset version hasn't been bumped, so it somehow hashes to the same result as before - a different Editor version then pulls the cache and gets an incompatible asset. Using namespaces would solve this, at the expense of increased cache usage.

    To avoid similar issues like this (and other issues where developer machines pollute the cache) a common use case is to only allow developers to download from the build machine cache, not upload to it. So the build machine is the 'source of truth' if you like for populating the cache. The build machine uploads and downloads.
     
  3. myke-synnett

    myke-synnett

    Joined:
    Jan 8, 2019
    Posts:
    4
    Hello!
    Thanks for following up with me. I eventually figured out the issue and resolved it. Turns out the version of Unity my project was on had a bug that broke using Unity Accelerator. Once I updated to a version of Unity that had this bug fixed everything started to work fine. Thanks for all the extra bits of info though, I'll jot that down in case I need it in the future. Also, thanks for updating the documentation too.