开发者

Perforce view loaded by hudson slave but not by master

We are using hudson for our builds and we have found that if we use the master to do the build the perforce view is not loaded. There are no errors in the console except that if it is a new project the perforce plugin seems to be detecting the wrong version and trying to load changelist 0. Other than that, running the exact same commands shown in the console on the master as the hudson user works correctly. Here is the console output for a new project building on the linux master (note this doesn't do anything other than load the view. Checking the directory afterwards shows nothing was loaded):

Started by user anonymous
Building on master
Clearing workspace...
Cleared workspace.
Using master perforce client: hudson_alec_test
[workspace] $ /usr/local/bin/p4 workspace -o hudson_alec_test
Last sync'd change: 0
[workspace] $ /usr/local/bin/p4 counter change
[workspace] $ /usr/local/bin/p4 -s changes //hudson_alec_test/...@1,@5561
Sync'ing workspace to changelist 0 (forcing sync of unchanged files).
[workspace] $ /usr/local/bin/p4 sync -f //hudson_alec_test/...@0
Sync complete, took 259 ms
Finished: SUCCESS

Here's the output from this project once I bind it to our mac slave (no change in project configuration other than binding it to the slave - note now perforce correctly detects the changes and correctly loads the view):

Started by user anonymous
Building remotely on xxx.xxx.xxx.xxx
Clearing workspace...
Cleared workspace.
Using remote perforce client: hudson_alec_test--yyy
[alec_test] $ /usr/local/bin/p4 workspace -o hudson_alec_test--yyy
[alec_test] $ /usr/local/bin/p4 login -p
[alec_test] $ /usr/local/bin/p4 -P xxx workspace -o hudson_alec_test--yyy
Changing P4 Client Root to: /Users/hudson/hudson_builds/workspace/alec_test/
Changing P4 Client View from:
//depot/... //hudson_alec_test--yyy/...

Changing P4 Client View to: 
  //depot/webservices/dev/projects/parents/... //hudson_alec_test-yyy/webservices/dev/projects/parents/...
Saving new client hudson_alec_test--yyy
[alec_test] $ /usr/local/bin/p4 -P xxx -s client -i
Last sync'd change: 0
[alec_test] $ /usr/local/bin/p4 -P xxx counter change
[alec_test] $ /usr/local/bin/p4 -P xxx -s changes //hudson_alec_test--yyy/...@1,@5561
[alec_test] $ /usr/local/bin/p4 -P xxx describe -s 5554
[alec_test] $ /usr/local/bin/p4 -P xxx describe -s 5552
[alec_test] $ /usr/local/bin/p4 -P xxx describe -s 5551
[alec_test] $ /usr/local/bin/p4 -P xxx describe -s 5550
[alec_test] $ /usr/local/bin/p4 -P xxx describe -s 5213
[alec_test] $ /usr/local/bin/p4 -P xxx describe -s 5211
Sync'ing workspace to changelist 5554 (forcing sync of unchanged files).
[alec_test] $ /usr/local/bin/p4 -P xxx sync -f //hudson_alec_test--yyy/...@5554
Sync complete, took 409 ms
Finished: SUCCESS

And now changing it back to the master the console output is: (again no change in project configuration other than binding it to the master vs the slave but now no files are loaded in the workspace on the master)

Started by user anonymous
Building on master
Clearing workspace...
Cleared wo开发者_JAVA百科rkspace.
Using master perforce client: hudson_alec_test
[workspace] $ /usr/local/bin/p4 workspace -o hudson_alec_test
Last sync'd change: 5554
[workspace] $ /usr/local/bin/p4 counter change
[workspace] $ /usr/local/bin/p4 -s changes //hudson_alec_test/...@5555,@5561
Sync'ing workspace to changelist 5554 (forcing sync of unchanged files).
[workspace] $ /usr/local/bin/p4 sync -f //hudson_alec_test/...@5554
Sync complete, took 229 ms
Finished: SUCCESS

I have seen other questions reference a perforce-hudson log but I can't find any perforce logging other than what's shown in the console. Any suggestions on how to debug this further would be greatly appreciated.

As I was writing up this question I noticed that on the master the perforce plugin doesn't seem to be setting the client view in the log the way it does on the slave. I don't know if this has anything to do with the issue but it is suspicious.


You're using 2 different clients. Your slave looks to be managed by the plugin, maybe? So although you say nothing is different, your clients are different. Note the [workspace] $ /usr/local/bin/p4 -s changes //hudson_alec_test/...@1,@5561, then it syncs to @0, that means it didn't find any changes in that depot. You see it again in your second test [workspace] $ /usr/local/bin/p4 -s changes //hudson_alec_test/...@5555,@5561 and then it syncs to @5554. There were no changes in your depot between @5555 and @5561. Most likely its because your depot path between the 2 clients is different?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜