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

Bug 1318403

Summary: Successful builds occasionally missing "duration" in json/yaml representation
Product: OpenShift Container Platform Reporter: Mike Fiedler <mifiedle>
Component: BuildAssignee: Ben Parees <bparees>
Status: CLOSED ERRATA QA Contact: Wenjing Zheng <wzheng>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: aos-bugs, bparees, tdawson, xiuwang
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Build duration was not being consistently calculated. Consequence: Build duration displayed in the web console and on the command line was inaccurate. Fix: Calculate the duration consistently when builds complete. Result: A consistent build duration value is reported for builds under all circumstances.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-12 19:05:08 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 Mike Fiedler 2016-03-16 18:40:23 UTC
Description of problem:

Successfully completed builds normally have a "duration" attribute in the "status" section.   But occasionally (1 in 100?) and most often when running simultaneous builds, I get output with no duration.   This causes automation to have missing build duration data.

I haven't been able to discover an exact trigger.  The builds themselves are successful.

Version-Release number of selected component (if applicable): 3.2.0.3


How reproducible:  infrequent


Steps to Reproduce:
Difficult

1.  Run many builds of quick start apps simultaneously and repeatedly
2.  Get the json or yaml representation of each build as it completes
3.  Verify if the status section contains duration

Actual results:

duration is occasionally missing

Expected results:

Completed builds contain a duration in status.

Additional info:

Let me know if you want a build log, but there is never anything unusual about them - they end with a good push.

status:
  completionTimestamp: 2016-03-16T18:21:42Z
  config:
    kind: BuildConfig
    name: nodejs-example
    namespace: t4
  outputDockerImageReference: 172.30.179.86:5000/t4/nodejs-example:latest
  phase: Complete

Comment 1 Mike Fiedler 2016-05-10 11:51:00 UTC
The same builds show up without a duration in the command line (oc get builds) and web UI as well.   The duration column is blank.

Comment 2 Ben Parees 2017-01-23 14:57:25 UTC
I just reworked the duration logic here, please see if this is still an issue:

https://github.com/openshift/origin/pull/12569

Comment 3 XiuJuan Wang 2017-02-06 09:33:25 UTC
Start dozen of simultaneous builds in parallel, every build has the duration time.

Test in openshift v3.5.0.16+a26133a

Comment 5 errata-xmlrpc 2017-04-12 19:05:08 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-2017:0884