Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52590

p4-plugin sets client root to null

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: p4-plugin
    • Labels:
    • Environment:
      Jenkins 2.138.3
      p4-plugin 1.9.5
    • Similar Issues:

      Description

      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'.

        Attachments

          Issue Links

            Activity

            Hide
            danielresolutiongames 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.

            Show
            danielresolutiongames 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.
            Hide
            p4karl Karl Wirth added a comment -

            Have contacted Andrew directly via the support channel.

            Show
            p4karl Karl Wirth added a comment - Have contacted Andrew directly via the support channel.
            Hide
            p4karl 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'.

             

             

            Show
            p4karl 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'.    
            Hide
            p4paul Paul Allen added a comment -

            Ready for release.

            Show
            p4paul Paul Allen added a comment - Ready for release.
            Hide
            p4paul Paul Allen added a comment -

            Released in 1.9.6

            Show
            p4paul Paul Allen added a comment - Released in 1.9.6
            Hide
            p4karl Karl Wirth added a comment - - edited

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

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

              People

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

                Dates

                Created:
                Updated:
                Resolved: