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

p4 plugin doesn't add '/...' to older p4sync calls.

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Updating our p4 plugin from 1.8.12 to 1.9.6, we find that jobs using the older p4sync, where the trailing '/...' was optional, fails to write out useful/working p4 clients.

      For p4sync call:

       p4sync(charset: 'none', credential: credential, depotPath: '//depot/svrtools/mainline/sme-tools/jenkins_test',
                 format: user + '-${NODE_NAME}-${JOB_NAME}', populate: [
                   $class: 'AutoCleanImpl', delete: true, modtime: false,
                   parallel: [
                     enable: false, minbytes: '1024', minfiles: '1',
                     path: '/usr/local/bin/p4', threads: '4'
                   ],
                   pin: '', quiet: true, replace: true
                 ]
                )
      

      We get in the resultant client:

      View:
      	//depot/svrtools/mainline/sme-tools/jenkins_test //build-repo01-jenkins-test/jenkins_test
      

      Which then fails to sync/checkout anything.

      The log output is attached as 'a.txt'

      Behaviour of this seems changed in :

      https://swarm.workshop.perforce.com/changes/24767

      If we revert plugin to older, and then delete generated client, we see the difference in c.txt output.

      We also see our view has changed :

      View:
      	//d-alviso/svrtools/mainline/sme-tools/jenkins_test/... //build-repo01-jenkins-test/...
      

        Attachments

        1. a.txt
          4 kB
        2. c.txt
          4 kB

          Activity

          Hide
          p4karl Karl Wirth added a comment -

          Hi Matthew Hall, Thanks for highlighting this. It's an interesting one because the developers seem to have corrected the behavior to be correct Perforce behavior and documented it in the bubble help:

          List of one or more depot paths (separated by new lines)
          
          For example //depot/A/...
          //depot/B/...
          
          //depot/C/file.txt
          

          So in your example '//depot/svrtools/mainline/sme-tools/jenkins_test' is specifying the file not the folder 'jenkins_test'.

          However that breaks backward compatible systems that relied on the old behavior. I know we have been asked to support the usage case of only syncing a single file so we cant just revert to the old behavior without additional checking. Therefore I'm going to flag this to the product managers.

          Show
          p4karl Karl Wirth added a comment - Hi Matthew Hall , Thanks for highlighting this. It's an interesting one because the developers seem to have corrected the behavior to be correct Perforce behavior and documented it in the bubble help: List of one or more depot paths (separated by new lines) For example //depot/A/... //depot/B/... //depot/C/file.txt So in your example '//depot/svrtools/mainline/sme-tools/jenkins_test' is specifying the file not the folder 'jenkins_test'. However that breaks backward compatible systems that relied on the old behavior. I know we have been asked to support the usage case of only syncing a single file so we cant just revert to the old behavior without additional checking. Therefore I'm going to flag this to the product managers.
          Hide
          p4karl Karl Wirth added a comment -

          Reproduction Steps:
          (1) Install p4-plugin 1.8.12
          (2) Create pipeline job (editor is fine) and a 'p4sync' step that has a classic depot view that ends in a folder. For example '//depot/Project1/main'.
          (3) Run the job. '/...' is appended to client view and files under path are synced.
          (4) Upgrade to 1.9.6
          (5) Force run the same job. '/...' is not appended to client view. No files are synced because 'main' is a folder not a file.

          Show
          p4karl Karl Wirth added a comment - Reproduction Steps: (1) Install p4-plugin 1.8.12 (2) Create pipeline job (editor is fine) and a 'p4sync' step that has a classic depot view that ends in a folder. For example '//depot/Project1/main'. (3) Run the job. '/...' is appended to client view and files under path are synced. (4) Upgrade to 1.9.6 (5) Force run the same job. '/...' is not appended to client view. No files are synced because 'main' is a folder not a file.
          Hide
          mhall4 Matthew Hall added a comment -

          Thanks for the info Karl. This is a rough change to suddenly run into, because we now have to go and fix several hundred Jenkinsfiles across multiple teams and groups.

          Show
          mhall4 Matthew Hall added a comment - Thanks for the info Karl. This is a rough change to suddenly run into, because we now have to go and fix several hundred Jenkinsfiles across multiple teams and groups.
          Hide
          p4karl Karl Wirth added a comment -

          Hi Matthew Hall. Happy to help and I appreciate how painful that's going to be. FYI Wrishi Basu

          Show
          p4karl Karl Wirth added a comment - Hi Matthew Hall . Happy to help and I appreciate how painful that's going to be. FYI Wrishi Basu
          Hide
          wbasupm W Basu Perforce added a comment -

          Matthew Hall - we appreciate the pain, however, adding the support back as feature will cause more disruption than help. However, as Karl Wirth said, he can help you for this one-off update where possible.

          Show
          wbasupm W Basu Perforce added a comment - Matthew Hall  - we appreciate the pain, however, adding the support back as feature will cause more disruption than help. However, as Karl Wirth said, he can help you for this one-off update where possible.
          Hide
          wbasupm W Basu Perforce added a comment -

          Punting as it no longer matches our direction and features

          Show
          wbasupm W Basu Perforce added a comment - Punting as it no longer matches our direction and features

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            mhall4 Matthew Hall
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: