-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Hudson 1.347
Perforce Plugin 1.0.21
Hosted on Linux FC11
Perforce Server version: P4D/SOLARIS10X86_64/2008.1/176084 (2008/11/20)
The hudson console (see below) shows evidence that my perforce client viewspec is modified each time the job runs. My hudson job configuratino includes the following settings:
Use Custom Workspace (checked)
Let Hudson Manage Workspace View (not checked)
Normally Hudson does not change the viewspec. However today we have network problems and could not connect to the perforce server. This caused hudson jobs to fail obviously. When the perforce server came back online hudson started a build and it failed. When I looked at the perforce client spec I noticed the entire client viewspec was erased.
Typical console output:
Started by an SCM change
Using master perforce client: autouser_wax-centaur-12
[p4centaur] $ /corp/tools/centaur/bin/p4 workspace -o autouser_wax-centaur-12
Saving modified client autouser_wax-centaur-12
[p4centaur] $ /corp/tools/centaur/bin/p4 s client -i <- DID NOT EXPECT THIS TO HAPPEN
Last sync'd change: 399778
[p4centaur] $ /corp/tools/centaur/bin/p4 counter change
[p4centaur] $ /corp/tools/centaur/bin/p4 -s changes //autouser_wax-centaur-12/...@399779,@399780
[p4centaur] $ /corp/tools/centaur/bin/p4 describe -s 399780
Sync'ing workspace to changelist 399780.
[p4centaur] $ /corp/tools/centaur/bin/p4 sync //autouser_wax-centaur-12/...@399780
Sync complete, took 4771 ms
[p4centaur] $ /bin/sh -xe /tmp/hudson2494931625930037700.sh
+ /home/autouser/hudson_cn5410.bash
Thanks for the report! I'll try to look into it as soon as I can.
The perforce plugin doesn't update unless it differs from what is on the server. In this case, when your perforce server came back up and the build started, the client spec had already been changed. It attempted to change the usual settings to what it needs (the root and host fields, specifically) and that's why it was changing your client spec.
Another possibility is that due to your network problems, the perforce plugin was not able to fetch the entire workspace spec, so when it saved it back to the server, things were missing. I'll see if I can add some better error handling if this was the case, so that it doesn't go ahead and try to save the spec if it wasn't retrieved properly in the first place.