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

Explain why duplicate syncIDs are a problem

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • p4-plugin
    • 1.10.0

      In the polling log the message 'duplicate syncID found' can be raised:

      P4: Polling on: master with:jenkins-master-TestJobName-0
      WARNING: duplicate syncID found: jenkins-NODE_NAME-TestJobName-EXECUTOR_NUMBER
      Found last change 563 on syncID jenkins-NODE_NAME-TestJobName-EXECUTOR_NUMBER
      Found last change 581 on syncID jenkins-NODE_NAME-TestJobName-EXECUTOR_NUMBER
      ... p4 client -o jenkins-master-JENKINS-TestJobName-0 +
      

      This is related to:

          https://www.perforce.com/manuals/jenkins/Content/P4Jenkins/pipeline-script-setup.html#Advanced_Polling

      When polling the plugin needs a way to know what has changed since the last job. This is done by stripping the generic variables from the workspace name then saving the last synced changelist number as a 'SyncID' and storing it in the 'build.xml' on the Jenkins master.

      If the workspace name is reused in the same job, but with a different view this could cause the highest changelist to be different and may cause the polling to miss new changes.

      Therefore the recommendation is not to reuse the workspace name:

         https://www.perforce.com/manuals/jenkins/Content/P4Jenkins/variable-expansion.html#variable_expansion-multi_sync

      Multiple Syncs
      
      If you need more than one sync task in a script you MUST use a different workspace name.
      
      You can control this by customizing the Workspace Name Format field.  The default value is jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER} and will not appear in the generated snippet, however if you change this to jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}-libs you will see a new attribute in the snippet
      
            format: 'jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}-libs'.
      

      It would be good if the WARNING message was expanded to give users an idea of what the problem is. For example:

      WARNING: duplicate syncID found: jenkins-NODE_NAME-TestJobName-EXECUTOR_NUMBER
      You may be reusing the same workspace name in multiple sync steps which is not recomended. Please see the 'Multiple Syncs' section of the 'Helix Plugin for Jenkins Guide' for more information.
      

       

       

       

       

       

            Unassigned Unassigned
            p4karl Karl Wirth
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: