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

Empty array returned with p4sync after 1.10.6

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: p4-plugin
    • Labels:
    • Environment:
      P4-Plugin 1.10.6
    • Similar Issues:

      Description

      Copied from JENKINS-52806:

      Alisdair Robertson added a comment - 6 hours ago

      Prior to this change the p4sync step yielded a map of the env vars, I'm using this in many pipeline scripts. After updating to 1.10.6 from 1.10.4 the p4sync step returns an empty map (breaking my pipeline scripts!)

      Was this expected?

        Attachments

          Activity

          Hide
          p4karl Karl Wirth added a comment -

          Hi Alisdair Robertson,

          Thanks for highlighting this. I was easily able to reproduce this so will pass to the developers.

           

          Reproduction steps

          Jenkins 2.176.1

          Create a Jenkins pipeline job and put the following code in the Pipeline script section:

          node() {
                  node {
                      def scmVars = p4sync charset: 'none', credential: 'JenkinsMaster', populate: autoClean(delete: true, modtime: false, parallel: [enable: false, minbytes: '1024', minfiles: '1', threads: '4'], pin: '', quiet: false, replace: true, tidy: false), source: streamSource('//streams/main')
                      echo "Result was ${scmVars}"
                  }
              }
          

          On p4-plugin 1.10.4 the result is:

          [Pipeline] echo
          Result was [HUDSON_CHANGELOG_FILE:/var/lib/jenkins/jobs/PipelineEditorNode/builds/8/changelog0.xml, P4_CHANGELIST:2090, P4_CLIENT:jenkins-master-PipelineEditorNode-2, P4_PORT:perforce:1666, P4_ROOT:/var/lib/jenkins/workspace/PipelineEditorNode%402, P4_TICKET:6B786DA4A0A6298A60822A383758D0C4, P4_USER:super]

          On p4-plugin 1.10.6 the result set is empty:

          [Pipeline] echo
          Result was [:]
          Show
          p4karl Karl Wirth added a comment - Hi Alisdair Robertson , Thanks for highlighting this. I was easily able to reproduce this so will pass to the developers.   Reproduction steps Jenkins 2.176.1 Create a Jenkins pipeline job and put the following code in the Pipeline script section: node() { node { def scmVars = p4sync charset: 'none' , credential: 'JenkinsMaster' , populate: autoClean(delete: true , modtime: false , parallel: [enable: false , minbytes: '1024' , minfiles: '1' , threads: '4' ], pin: '', quiet: false , replace: true , tidy: false ), source: streamSource(' //streams/main') echo "Result was ${scmVars}" } } On p4-plugin 1.10.4 the result is: [Pipeline] echo Result was [HUDSON_CHANGELOG_FILE:/ var /lib/jenkins/jobs/PipelineEditorNode/builds/8/changelog0.xml, P4_CHANGELIST:2090, P4_CLIENT:jenkins-master-PipelineEditorNode-2, P4_PORT:perforce:1666, P4_ROOT:/ var /lib/jenkins/workspace/PipelineEditorNode%402, P4_TICKET:6B786DA4A0A6298A60822A383758D0C4, P4_USER: super ] On p4-plugin 1.10.6 the result set is empty: [Pipeline] echo Result was [:]
          Hide
          alisdair_robertson Alisdair Robertson added a comment -

          Thanks for this Karl! I hope it's an easy fix.

          This originally occurred for us on the latest Jenkins version (2.190.2)

          Show
          alisdair_robertson Alisdair Robertson added a comment - Thanks for this Karl! I hope it's an easy fix. This originally occurred for us on the latest Jenkins version (2.190.2)
          Hide
          p4paul Paul Allen added a comment -

          Passes internal tests - pushed to master

          It may fail CI builds as Jenkins infra has been a bit sensitive lately.

          https://ci.jenkins.io/job/Plugins/job/p4-plugin/job/master/409/

          Show
          p4paul Paul Allen added a comment - Passes internal tests - pushed to master It may fail CI builds as Jenkins infra has been a bit sensitive lately. https://ci.jenkins.io/job/Plugins/job/p4-plugin/job/master/409/
          Hide
          p4paul Paul Allen added a comment -

          Released in 1.10.7

          (cleaning up old issues)

          Show
          p4paul Paul Allen added a comment - Released in 1.10.7 (cleaning up old issues)

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            p4karl Karl Wirth
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: