[JIRA] (JENKINS-58949) If job fails in cleanup further triggering fails

0 views
Skip to first unread message

kwirth@perforce.com (JIRA)

unread,
Aug 15, 2019, 9:43:01 AM8/15/19
to jenkinsc...@googlegroups.com
Karl Wirth created an issue
 
Jenkins / Bug JENKINS-58949
If job fails in cleanup further triggering fails
Issue Type: Bug Bug
Assignee: Unassigned
Attachments: build.xml, log
Components: p4-plugin
Created: 2019-08-15 13:42
Environment: Jenkins 2.176.1
P4-Plugin 1.10.3
Labels: P4_VERIFY
Priority: Blocker Blocker
Reporter: Karl Wirth

 Reproduction Steps:

  • Created Triggered Pipeline AutoClean job
  • Add Trigger to Perforce server
  • Submit a file to trigger path.
  • Job runs.
  • Allow it to run to completion.
  • Submit a file to trigger path.
  • Jobs runs.
  • Press X on job before it gets to the sync stage. Result of job will be ABORTED.
  • Submit a file to trigger path.
  • Job DOES NOT run.

Check Perforce P4 Trigger Log. It shows

Last Perforce Change
P4: Polling on: master with:jenkins-master-00405042-TriggeredBuildFailsAfterAbort-0
No previous build found...
P4: Polling: No changes in previous build.
P4: Polling error; no previous change.
P4: No changes

Job will not run again until a manual build is performed.

 

Example Jenkinsfile (in editor is OK):

pipeline {
 agent {
  label 'docker-slave'
 }
 stages {
  stage("Get Sources") {
   steps {
    script {
       p4sync charset: 'none', credential: 'JenkinsMaster', populate: autoClean(delete: true, modtime: true, parallel: [enable: false, minbytes: '1024', minfiles: '1', threads: '4'], pin: '', quiet: false, replace: true, tidy: false), source: depotSource('''//depot/test/...''')
       }
    }
   }
   stage("Invoke Builds") {
    steps {
       println "Build code here."
    }
   }
  }
 }

Have attached the 'build.xml' of the aborted build and console log.

 

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

kwirth@perforce.com (JIRA)

unread,
Aug 15, 2019, 9:53:02 AM8/15/19
to jenkinsc...@googlegroups.com
Karl Wirth commented on Bug JENKINS-58949
 
Re: If job fails in cleanup further triggering fails

Note: Cause on customers site was manually aborted job.

kwirth@perforce.com (JIRA)

unread,
Aug 16, 2019, 11:26:04 AM8/16/19
to jenkinsc...@googlegroups.com
Karl Wirth updated an issue
 
Change By: Karl Wirth
 *Reproduction Steps:*
* Created Triggered Pipeline AutoClean job
* Add Trigger to Perforce server
* {color:#0747a6}Submit a file to trigger path.{color}
* {color:#57d9a3}Job runs.{color}
* Allow it to run to completion.
* {color:#0747a6}Submit a file to trigger path.{color}
* {color:#57d9a3}Jobs runs.{color}
* {color:#de350b}Press X{color} on job before it gets to the sync stage. Result of job will be ABORTED.
* {color:#0747a6}Submit a file to trigger path.{color}
* {color:#de350b}Job DOES NOT run.{color}


Check Perforce P4 Trigger Log. It shows
{code:java}

Last Perforce Change
P4: Polling on: master with:jenkins-master-00405042-TriggeredBuildFailsAfterAbort-0
No previous build found...
P4: Polling: No changes in previous build.
P4: Polling error; no previous change.
P4: No changes
{code}

Job will not run again until a manual build is performed.

 

Example Jenkinsfile (in editor is OK):
{code:java}

pipeline {
agent {
  label 'docker-slave'
}
stages {
  stage("Get Sources") {
   steps {
    script {
       p4sync charset: 'none', credential: 'JenkinsMaster', populate: autoClean(delete: true, modtime: true, parallel: [enable: false, minbytes: '1024', minfiles: '1', threads: '4'], pin: '', quiet: false, replace: true, tidy: false), source: depotSource('''//depot/test/...''')
       }
    }
   }
   stage("Invoke Builds") {
    steps {
       println "Build code here."
    }
   }
  }
}
{code}
Have attached the 'build.xml' of the aborted build and console log.
Build.xml is missing TagAction.

 
+Additionally:+

++If I manually strip TagAction from a build.xml all future polling is also broken. However so far I cannot abort a polled job at the correct time to cause the build.xml to be missing TagAction.

kwirth@perforce.com (JIRA)

unread,
Aug 16, 2019, 11:26:05 AM8/16/19
to jenkinsc...@googlegroups.com
++ If I manually strip TagAction from a build.xml all future polling is also broken. However so far I cannot abort a polled job at the correct time to cause the build.xml to be missing TagAction.

kwirth@perforce.com (JIRA)

unread,
Aug 16, 2019, 11:27:02 AM8/16/19
to jenkinsc...@googlegroups.com
If I manually strip TagAction from a build.xml then reboot the Jenkins machine all future polling is also broken. However so far I cannot abort a polled job at the correct time to cause the build.xml to be missing TagAction.

kwirth@perforce.com (JIRA)

unread,
Oct 3, 2019, 10:32:02 AM10/3/19
to jenkinsc...@googlegroups.com
 
Re: If job fails in cleanup further triggering fails

Need to retest after changes in 10.0.1.4

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

kwirth@perforce.com (JIRA)

unread,
Oct 3, 2019, 11:22:15 AM10/3/19
to jenkinsc...@googlegroups.com

Tested and bug still seen. Additional changes going in at the moment so retest in 1 week.

pallen@perforce.com (JIRA)

unread,
Dec 5, 2019, 10:01:02 AM12/5/19
to jenkinsc...@googlegroups.com
Paul Allen updated an issue
 
Change By: Paul Allen
Priority: Blocker Minor

cbopardikar@perforce.com (JIRA)

unread,
Dec 12, 2019, 6:21:03 AM12/12/19
to jenkinsc...@googlegroups.com
Charusheela Bopardikar started work on Bug JENKINS-58949
 
Change By: Charusheela Bopardikar
Status: Open In Progress

pallen@perforce.com (JIRA)

unread,
Dec 17, 2019, 7:08:03 AM12/17/19
to jenkinsc...@googlegroups.com
Paul Allen commented on Bug JENKINS-58949
 
Re: If job fails in cleanup further triggering fails

The P4 Trigger is a top level endpoint in Jenkins and wakes up all Subscribed Jenkins jobs, checks for changes then scheduled a build.  If the previous run failed or was aborted then no changes are recorded so further polling or in this case triggers will fail. A 'Build Now' would correct the state and all would be back to normal.

Ideally we could carry the previous built changes forward, or change the logic to search the previous builds.  Perhaps recording the 'head' change would be enough for failed/aborted builds, but that might not be ideal in all circumstances. 

cbopardikar@perforce.com (JIRA)

unread,
Dec 18, 2019, 5:15:05 AM12/18/19
to jenkinsc...@googlegroups.com

cbopardikar@perforce.com (JIRA)

unread,
Jan 6, 2020, 6:30:02 AM1/6/20
to jenkinsc...@googlegroups.com
Charusheela Bopardikar closed an issue as Won't Do
 

Workaround is available and possible fix may not be appropriate in all circumstances.

Change By: Charusheela Bopardikar
Status: In Progress Closed
Resolution: Won't Do
Reply all
Reply to author
Forward
0 new messages