History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-2617
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Robin Shen
Reporter: J. Mash
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Perforce Repository - Root Directory Setting May Cause Sync Failures

Created: 08/Jan/16 09:50 PM   Updated: 11/Feb/16 05:52 AM
Component/s: None
Affects Version/s: 6.1.0
Fix Version/s: 6.1.5

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: Linux, Mac, and Windows


 Description  « Hide
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.

 All   Comments   Work Log   Change History      Sort Order:
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?

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.

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.

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.

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?

J. Mash [10/Feb/16 01:22 AM]
Yes, precisely.

Robin Shen [11/Feb/16 01:37 AM]
Thanks for the info. Verified and will be fixed in 6.1.5.