<< Back to previous view

[QB-2617] Perforce Repository - Root Directory Setting May Cause Sync Failures
Created: 08/Jan/16  Updated: 11/Feb/16

Status: Resolved
Project: QuickBuild
Component/s: None
Affects Version/s: 6.1.0
Fix Version/s: 6.1.5

Type: Bug Priority: Major
Reporter: J. Mash Assigned To: Robin Shen
Resolution: Fixed Votes: 0
Remaining Estimate: Unknown Time Spent: Unknown
Original Estimate: Unknown
Environment: Linux, Mac, and Windows


 Description   
I am currently working with a Perforce repository that has been configured with a 'Root Directory' specified as '2015/Main'. Any time that repository is synced on a clean host (a newly provisioned one, or one that's had it's workspace deleted using the QuickBuild interface), if fails with a message similar to the following:

[* ]Step '<step>' is failed: Cannot run program "sh" (in directory "<workspace>/2015/Main"): error=2, No such file or directory

It seems as though QuickBuild is attempting to run a shell script to perform the sync before the workspace directory even exists, so a potential fix for this issue would be to ensure the finalized workspace root directory is created before attempting to run the script.

 Comments   
Comment by Robin Shen [ 09/Jan/16 02:16 AM ]
This is odd as QB does not call "sh" to do perforce sync. Also I tried with a clean workspace and it works fine. Is this failing step actually a build command step?
Comment by J. Mash [ 16/Jan/16 05:05 AM ]
The failing step is/was a 'Repository > Checkout' step, wrapped in a 'Composition > Sequential' step (eventually, this would hold Checkout steps for two qb repositories), which was in the 'master' step of the configuration. There were no other steps referenced by the configuration. The repository definition itself had the 'Root Directory' defined as '2015/Main', but otherwise was a pretty normal repository definition. Manually creating that directory structure directly on the host caused the step to succeed, as did removing the 'Root Directory' setting entirely.

I will see if I can create a db exhibiting the issue and attach that here for your review.
Comment by Robin Shen [ 17/Jan/16 02:01 AM ]
You mentioned "this would hold Checkout steps for two qb repositories". In case two perforce repositories are used in a single build for checkout, please make sure to use root directories not overlapping with each other.
Comment by J. Mash [ 09/Feb/16 05:37 AM ]
I've done a bit more recon on this, and I believe I've tracked the issue down.

It appears to be something specific with the 'Reconcile Before Build' option when used in conjunction with the 'Root Directory' setting in a Perforce Repository definition -- I suspect that the 'Reconcile Before Build' feature uses a shell script to do the work, but doesn't take into account this specific edge-case where the workspace is clean (either cleaned via the UI, or a newly provisioned host) and the 'Root Directory' setting is in use.

That would explain the odd message concerning a "sh" call during the perforce sync, but I'll defer to you whether my suspicions are correct.
Comment by Robin Shen [ 10/Feb/16 12:39 AM ]
Do you mean that with root directory specified and option "reconcile before build" used, this issue will occur every time when workspace is cleaned up?
Comment by J. Mash [ 10/Feb/16 01:22 AM ]
Yes, precisely.
Comment by Robin Shen [ 11/Feb/16 01:37 AM ]
Thanks for the info. Verified and will be fixed in 6.1.5.
Generated at Thu May 16 21:39:12 UTC 2024 using JIRA 189.