[JIRA] (JENKINS-58067) Explain why duplicate syncIDs are a problem

13 views
Skip to first unread message

kwirth@perforce.com (JIRA)

unread,
Jun 18, 2019, 7:09:02 AM6/18/19
to jenkinsc...@googlegroups.com
Karl Wirth created an issue
 
Jenkins / Improvement JENKINS-58067
Explain why duplicate syncIDs are a problem
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: p4-plugin
Created: 2019-06-18 11:08
Environment: 1.10.0
Labels: P4_C
Priority: Minor Minor
Reporter: Karl Wirth

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.

 

 

 

 

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

conkers87@gmail.com (JIRA)

unread,
Aug 30, 2019, 3:36:02 PM8/30/19
to jenkinsc...@googlegroups.com
Kris Conklin commented on Improvement JENKINS-58067
 
Re: Explain why duplicate syncIDs are a problem

I have seen these errors for a long time in my logs but this is the first time ive actually understood why, so I would agree a better error text would be very helpful.

kwirth@perforce.com (JIRA)

unread,
Sep 2, 2019, 4:15:02 AM9/2/19
to jenkinsc...@googlegroups.com

Hi Kris Conklin - Thanks for the feeback. I will up the priority on this one to flag it to the developers.

kwirth@perforce.com (JIRA)

unread,
Sep 2, 2019, 4:15:03 AM9/2/19
to jenkinsc...@googlegroups.com
Karl Wirth updated an issue
 
Change By: Karl Wirth
Labels: P4_C P4_B P4_VERIFY
Reply all
Reply to author
Forward
0 new messages