Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Sporadic problems when checking out from Perforce #4335

SameOldSong ·

Approximately once a month we experience a sporadic problem when checking out sources from Perforce. The problem is always gone on the following build.

The step that checks out from Perforce is always green, there are no errors in log (Checking out revision '224925' of repository 'SW08_P4_all_sources_folders'...) but after the step is finished, instead of the source files we find only one file SW08_P4_all_sources_folders_copy.revision in the workspace directory. The change list in Perforce that is to be checked out does contain changes.

Because the step is marked as successful, the build continues on to the following steps and detects the problem only when it is necessary to access the missing files.

The workspace directory is cleared before every build. The build is configured to run on a chron schedule but only if there are changes in the repo

  • replies 8
  • views 369
  • stars 0
robinshen ADMIN ·

QB calls p4 command line to do the job. Please enable debug log level for the configuration, and then QB will print all p4 command called to build log when pulling the source. Also make sure that different destination folder should be configured to make sure workspace of each p4 repo is not overlapped with each other when multiple p4 repos are used in same build.

SameOldSong ·

we have activated Debug logging. We would also like to use build id as destination folder - to make sure the workspace folder is always new.
However, when I try to use build id in "Workspace directory setting" - I get this error on the configuration level. Is it not at all possible to use build id for a workspace folder?

2021-04-19_14h05_10.png 2021-04-19_14h06_53.png
robinshen ADMIN ·

Using build id as part of workspace is not possible, as QB expects the workspace remains unchanged in same configuration. Also build id is not available when QB evaluates the build necessary condition which may require to set up the workspace.

SameOldSong ·

The problem with checking out from P4 has just happened again. Now we have a Debug log. Do you need the whole log of the Perforce step or just some part?

robinshen ADMIN ·

Please examine the debug to see if the failed p4 command is printed out. Also make sure not to use dynamic workspace folders based on build id.

SameOldSong ·

we are not using dynamic workspace based on build id. As you mentioned yourself above - it is not even possible in QB.

With the help of the debug log we see now what the problem is. Sometimes the sources are checked out into a completely different directory. In the repository configuration "Root directory" is left empty, so it is supposed to check out into workspace directory by default. In about 95% of the cases it really does. However, in rare cases - it suddenly checks out into a different one. Workspace directory is configured to use the id of the configuration.

2021-04-21_20h19_26.png 2021-04-21_20h19_59.png

This is the client specification in the repository

robinshen ADMIN ·

One possibility is that the some other builds might be using the same p4 client name as this configuration. And even if current configuration sets up p4 client for current workspace, other concurrent build can step in to change it to other folder.

SameOldSong ·

thank you for the explanation and the help. We are digging in this direction. So this ticket can be closed as solved