Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Cloud Build Creating Multiple Workspaces in Perforce

Discussion in 'Unity Build Automation' started by Skyless-Games, Oct 26, 2015.

  1. Skyless-Games

    Skyless-Games

    Joined:
    Oct 8, 2015
    Posts:
    6
    We have Unity Cloud Build setup with Perforce including a workspace and user dedicated to UCB. However, whenever we go to build through UCB it creates an additional workspace.

    Is this by design? If not, any ideas on how to prevent this from happening?
     
    FlyingSquirrels likes this.
  2. Azzopardi

    Azzopardi

    Joined:
    Nov 5, 2015
    Posts:
    1
    I am currently experiencing this very same issue: UCB requests a new workspace be created with every build and with Perforce's limit of 20 these workspaces are quickly exhausting all available accounts. Purging the accounts from P4 is OK as a temporal solution but ultimately defeats the whole purpose of automation.

    Anyone got any clue as to why this is happening?
     
    FlyingSquirrels likes this.
  3. FlyingSquirrels

    FlyingSquirrels

    Joined:
    Sep 18, 2015
    Posts:
    84
    Bump - same problem here.
     
  4. FlyingSquirrels

    FlyingSquirrels

    Joined:
    Sep 18, 2015
    Posts:
    84
    perforce.PerforceException: Can't add client - over license quota. Try deleting old clients with 'client -d'. License count: 20 clients used of 20 licensed. Additional users/clients may be obtained for evaluation purposes by visiting... http://www.perforce.com/eval
     
  5. unitychrism

    unitychrism

    Joined:
    Sep 16, 2015
    Posts:
    122
    Hi all,

    This is something that's definitely on our radar, there is some work that needs to be taken care of behind the scenes in order to support our deletion of workspaces on the Perforce instance as part of the build. There is no definite ETA for when that work will occur, so purging the created workspaces on a schedule is currently our suggested temporary solution.

    I'll be sure to bookmark and update this thread as there is any further information on progress to share.
     
    FlyingSquirrels likes this.
  6. FlyingSquirrels

    FlyingSquirrels

    Joined:
    Sep 18, 2015
    Posts:
    84
    Thanks Chris - keep it up! :)
     
  7. FlyingSquirrels

    FlyingSquirrels

    Joined:
    Sep 18, 2015
    Posts:
    84
    Hey unitychrism,

    Any updates on this - its been a painful 3 months of deleting workspaces manually every time we exceed the 20 cap limit. Almost makes 'automated builds' feel manual! :-(

    Thanks
     
  8. grrava

    grrava

    Joined:
    Nov 11, 2012
    Posts:
    46
    Any updates on this? I still have this issue...
     
  9. KrcKung

    KrcKung

    Joined:
    Jul 18, 2017
    Posts:
    56
    Having the same problem as well. Does it need extra configuration for that?
     
  10. l7ocHoliday

    l7ocHoliday

    Joined:
    Aug 29, 2014
    Posts:
    6
    This is still a major issue for us as well. Has anybody found a solution?

    Is there a script that can run on the P4 server to automatically delete them?
     
  11. TripleBorisInc

    TripleBorisInc

    Joined:
    Nov 11, 2016
    Posts:
    2
    The original issue was that Cloud Build was creating a new workspace for every build. Now, it creates one workspace per platform and reuses it afterwards, which is, in my opinion, acceptable.
     
  12. l7ocHoliday

    l7ocHoliday

    Joined:
    Aug 29, 2014
    Posts:
    6
    Would love to get to even work, but when I just kicked off a new build and got the issue. I set the workspace as "Main" originally, and then it keeps adding "Main-RandomNumberString" to the end of it.

    Am I doing something wrong with the setup?

    Screen Shot 2017-10-16 at 12.47.15 AM.png

    Update: Ended up writing my own python script to clean up the workspaces in a cron job. Was a major pain as I'm not a Linux expert, but finally got it working.
     
    Last edited: Oct 19, 2017
  13. l7ocHoliday

    l7ocHoliday

    Joined:
    Aug 29, 2014
    Posts:
    6
    I can confirm that this has now been fixed. Been in contact with the cloud build engineers who helped out!
     
  14. EdRowlett-Barbu

    EdRowlett-Barbu

    Joined:
    Mar 16, 2015
    Posts:
    88
    Hello, sorry to necro post, however this issue has resurfaced now, the cloud build bot no longer deletes the workspaces after it is done. I think it might happen if the build fails due to compile error, but not sure yet