• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • p4-plugin
    • Jenkins 2.138.3
      p4-plugin 1.9.5

      We are using p4-plugin in freestyle jobs and the "Template" workspace behavior

      Regularly (but not always) we are seeing client root is set to "null" rather than being updated to the correct value. I have not been able to work out why some jobs have this problem but others do not. It does not seem to affect the syncing of the jobs, but it is confusing for users.

      It seems similar to an old issue that we had (possibly JENKINS-26589 )

      We are also seeing the following error sometimes:
      ERROR: P4 Task: failed: com.perforce.p4java.exception.P4JavaException: com.perforce.p4java.exception.P4JavaException: hudson.AbortException: P4JAVA: Error(s):
      Path '/null/...' is not under client's root 'null'.

          [JENKINS-52590] p4-plugin sets client root to null

          I can confirm this, but our setup is slightly different. We're using multibranch pipelines with Jenkinsfiles scanned over streams. I see this generally the first sync per pipeline, e.g. when creating the client. I've added a retry around the checkout step that "usually" takes care of the null ref (the second time generally works), but it not always. It looks like a timing issue to me, since it consistently (with an exception once or twice a month) works after that.

          Daniel Hagström added a comment - I can confirm this, but our setup is slightly different. We're using multibranch pipelines with Jenkinsfiles scanned over streams. I see this generally the first sync per pipeline, e.g. when creating the client. I've added a retry around the checkout step that "usually" takes care of the null ref (the second time generally works), but it not always. It looks like a timing issue to me, since it consistently (with an exception once or twice a month) works after that.

          Karl Wirth added a comment -

          Have contacted Andrew directly via the support channel.

          Karl Wirth added a comment - Have contacted Andrew directly via the support channel.

          Karl Wirth added a comment -

          Thanks to Andrew we were able to find the cause. Andrew spotted that the null client times matched the time the poll was run.

           

          Reproduction steps:

           

          1 - Create a polled Freestyle job

          2 - Build Job once.

          3 - Wait till next poll (or use Poll Now plugin).

          4 - Look at the polling log for the client name used in the polling. Run 'p4 client -o' on that client. The 'Root:' is 'null'.

           

           

          Karl Wirth added a comment - Thanks to Andrew we were able to find the cause. Andrew spotted that the null client times matched the time the poll was run.   Reproduction steps:   1 - Create a polled Freestyle job 2 - Build Job once. 3 - Wait till next poll (or use Poll Now plugin). 4 - Look at the polling log for the client name used in the polling. Run 'p4 client -o' on that client. The 'Root:' is 'null'.    

          Paul Allen added a comment -

          Ready for release.

          Paul Allen added a comment - Ready for release.

          Paul Allen added a comment -

          Released in 1.9.6

          Paul Allen added a comment - Released in 1.9.6

          Karl Wirth added a comment - - edited

          JENKINS-59300 - Same bug but new one is for template workspaces.

          Karl Wirth added a comment - - edited JENKINS-59300 - Same bug but new one is for template workspaces.

            p4paul Paul Allen
            barnish Andrew Barnish
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: