Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1565894

Summary: Jenkins job is delayed to delete for about 1 minute after removing pipeline build in openshift
Product: OpenShift Container Platform Reporter: wewang <wewang>
Component: BuildAssignee: Corey Daley <cdaley>
Status: CLOSED ERRATA QA Contact: wewang <wewang>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.10.0CC: aos-bugs, bparees
Target Milestone: ---   
Target Release: 3.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-30 19:12:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description wewang 2018-04-11 02:12:04 UTC
Description of problem
Jenkins job is delayed to delete for about 1 minute after removing pipeline build in openshift

Version-Release number of selected component (if applicable):
brew-pulp-xxxxxx/openshift3/jenkins-2-rhel7 v3.10(v3.10.0.20180406.113022) 838c3e9ab0d9 
openshift  v3.10.0-0.15.0

How reproducible:
always

Steps to Reproduce:
1. Create pipeline bc and other resources
2. Start a pipeline build and wait build to complete
3. Delete pipeline build in openshift
4. Check the The corresponding Jenkins job in jenkins webconsole 

Actual results:
The corresponding Jenkins job in webconsole is delayed to delete for about 1 minute

Expected results:
Should delete jenkins job synchronously

Additional info:

Comment 1 Corey Daley 2018-04-12 18:08:42 UTC
Ben/Gabe, 
Once the run reaches the onComplete or onFinalized section of the code it is removed from the runsToPoll list and is essentially ignored until the run gets deleted by the reconciler.  This was the existing logic and why runs were stacking up and not being removed at all when builds were deleted from OpenShift.

Is the desired behavior that the BuildSyncRunListener should check every 5 seconds for deleted builds and remove the associated job runs?

Comment 2 Corey Daley 2018-04-13 18:17:16 UTC
Submitted pull request https://github.com/openshift/jenkins-sync-plugin/pull/224

Comment 3 Corey Daley 2018-04-17 17:51:26 UTC
Pull request has been merged

Comment 4 wewang 2018-05-08 02:37:09 UTC
@Corey Daley could you move status to ON_QA,so I can verify it

Comment 5 wewang 2018-05-09 02:03:04 UTC
verified in Version-Release number of selected component (if applicable):
brew-pulp-xxxxxx/openshift3/jenkins-2-rhel7 v3.10 ac1e304de673
sync plugin v1.0.14

Comment 7 errata-xmlrpc 2018-07-30 19:12:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:1816