openshift / origin

Conformance test suite for OpenShift
http://www.openshift.org
Apache License 2.0
8.48k stars 4.7k forks source link

oc get builds reports wrong build duration #13254

Closed jimmidyson closed 7 years ago

jimmidyson commented 7 years ago

Builds show different duration to the actual time it took.

Version
$ oc version   
oc v1.5.0-alpha.3+2261a32-234
kubernetes v1.5.2+43a9be4
features: Basic-Auth

Server https://172.17.0.1:8443
openshift v1.5.0-alpha.3+cf7e336
kubernetes v1.5.2+43a9be4
Steps To Reproduce
  1. oc new-app fabric8/s2i-java:2.0.0~https://github.com/redhat-ipaas/http-pull-push-example.git
  2. Wait for build to finish
  3. Inspect build of build logs
  4. Run oc get builds
  5. Compare build time reported in pod to build time reported by oc get builds

Here's from the logs:

<SNIP>

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:24 min
[INFO] Finished at: 2017-03-06T17:19:29+00:00
[INFO] Final Memory: 40M/207M
[INFO] ------------------------------------------------------------------------
Copying Maven artifacts from /tmp/src/target to /deployments ...
Running: cp *.jar /deployments
... done

Pushing image 172.30.1.1:5000/myproject/http-pull-push-example:latest ...

<SNIP>

Push successful

$ oc get builds                             
NAME                       TYPE      FROM          STATUS     STARTED              DURATION
http-pull-push-example-2   Source    Git@6bbb5d2   Complete   About a minute ago   51s

51s vs 2m24s ?

bparees commented 7 years ago

please share the build yaml

bparees commented 7 years ago

this was probably fixed by https://github.com/openshift/origin/pull/12873 in which we were regressing the build object. Can you try from master?

bparees commented 7 years ago

(note that you'd need to use the master infrastructure images also)

bparees commented 7 years ago

@jimmidyson i'm closing this since i think it's fixed but feel free to ping back/re-open if you are still seeing it in a more recent version.