Bug 1371047

Summary: When JenkinsPipeline build in New status, should not display its stages info
Product: OKD Reporter: Yadan Pei <yapei>
Component: BuildAssignee: Jim Minter <jminter>
Status: CLOSED CURRENTRELEASE QA Contact: Wang Haoran <haowang>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, bparees, jforrest, mmccomas, xxia
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-09 21:53:47 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:
Attachments:
Description Flags
BuildinNewStatus none

Description Yadan Pei 2016-08-29 09:06:36 UTC
Description of problem:
When JenkinsPipeline build in New status, should not display its stages info

Version-Release number of selected component (if applicable):
openshift v1.3.0-alpha.3+4250e53
kubernetes v1.3.0+507d3a7
etcd 2.3.0+git

How reproducible:
Always

Steps to Reproduce:
1. Preparation
$ oc create -f https://raw.githubusercontent.com/openshift/origin/master/examples/image-streams/image-streams-centos7.json -n openshift
$ oc create -f https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/jenkins-ephemeral-template.json
2. Create jenkinsPipeLine bc and start build
$ oc new-app -f https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/pipeline/samplepipeline.json
$ oc new-app jenkins-ephemeral
$ oc start-build sample-pipeline 
3. When build sample-pipeline-1 is finished, click the Rebuild button on browse/pipeline/sample-pipeline/sample-pipeline-1 page
4. Check browse/pipeline/sample-pipeline page about all builds

Actual results:
4. When build sample-pipeline-2 is started and still in New status, stages state is displayed right away. And its stages' durations are same as previous pipeline build. But after sample-pipeline-2 is finished, its stages' durations then become updated.

Expected results:
4. When build is in New status, should not display any state info

Additional info:

Comment 1 Yadan Pei 2016-08-29 09:08:41 UTC
Created attachment 1195244 [details]
BuildinNewStatus

Comment 2 Jessica Forrester 2016-08-29 14:18:26 UTC
The API should strip jenkins status annotations instead of copying them when a build is cloned (Rebuild).  Since the feature is in tech preview I'm marking as UpcomingRelease.

Comment 3 Ben Parees 2016-08-29 15:32:47 UTC
@jessica what's the name of the annotation in question?

Comment 4 Jessica Forrester 2016-08-29 16:36:00 UTC
openshift.io/jenkins-status-json is the one causing the problem, but we should probably not be copying these either:

openshift.io/jenkins-log-url
openshift.io/jenkins-build-uri

in hindsight these annotations probably should have been namespaced with build.openshift.io or jenkins.openshift.io  they also aren't even consistent with each other for using uri vs url ...

Comment 5 Jim Minter 2016-09-22 11:08:05 UTC
https://github.com/openshift/origin/pull/11052

Comment 6 openshift-github-bot 2016-10-01 03:52:49 UTC
Commit pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/0311df5bacf8e80608d75f8474ec93eec943c596
fix bug 1371047 When JenkinsPipeline build in New status, should not display its stages info

Comment 7 Yadan Pei 2016-10-08 03:24:51 UTC
Checked against openshift v1.4.0-alpha.0+b1ed662 with steps in "Steps to Reproduce"


When JenkinsPipeline build in New status, it will show message "No stages have started." on BC and Builds page, stage info will ONLY be displayed when corresponding stage started