Bug 1298861 - Cannot store commit id in sti and docker build
Cannot store commit id in sti and docker build
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Build (Show other bugs)
3.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Cesar Wong
Wenjing Zheng
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-15 04:42 EST by wewang
Modified: 2016-05-12 13:13 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-12 13:13:45 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description wewang 2016-01-15 04:42:50 EST
Version:
openshift v1.1-793-gfa7cfe6
kubernetes v1.1.0-origin-1107-g4c8e6f4
etcd 2.1.2

Description of problem:
When sti or docker build, cannot store commit id in build

Steps to Reproduce:
$oc new-app -f  https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/build/ruby22rhel7-template-docker.json
$ oc get builds
 NAME                    TYPE      FROM      STATUS    STARTED         DURATION
ruby22-sample-build-1   Source    Git        running   5 minutes ago   32s
$ oc describe build 

Actual results:
no commit id stored in build 
Expected results:
a.  oc get build should be like follow:
 oc get builds
NAME                  TYPE      FROM          STATUS     STARTED              DURATION
ruby22-sample-build-1    Source    Git@5bc6aa5   Complete   About a minute ago   38s
b. oc describe build 
[root@dhcp-128-91 1201]# oc describe build ruby-sample-build-1
Name:            ruby-sample-build-1
...
Commit:            5bc6aa5d765399a83020f43092fe19def0720c6a
...
Output to:        ImageStreamTag origin-ruby-sample:latest
Comment 1 wewang 2016-01-15 04:45:05 EST
@Cesar Wong, I remembered I tested us: https://trello.com/c/Q88B6Okq/756-3-store-commit-id-in-build, it works in origin
Comment 2 Cesar Wong 2016-01-15 10:49:59 EST
This is a valid bug. It's a regression introduced by https://github.com/openshift/origin/pull/6576

Because we are now restricting updates, the builder service account is not allowed to update the build details because it has to have access to the build by type subresources.
Comment 3 Cesar Wong 2016-01-15 13:23:03 EST
PR here: https://github.com/openshift/origin/pull/6678
Comment 4 wewang 2016-01-18 05:09:02 EST
Hi, Cesar Wong , PR is merged ,but I tested in origin ,the problem still exist

version:
openshift v1.1-806-gd95ec08
kubernetes v1.1.0-origin-1107-g4c8e6f4
etcd 2.1.2

# oc get builds
NAME                  TYPE      FROM      STATUS    STARTED         DURATION
ruby-sample-build-1   Docker    Git       Running   6 seconds ago   6s
Comment 5 Cesar Wong 2016-01-18 10:25:47 EST
@wewang I built a release with the latest master and cannot reproduce this. The commit gets updated as expected. If you can still reproduce this, can you please add an environment of BUILD_LOGLEVEL=8 to the strategy in the bc and include the build log? Also, please include the output of describe build.
Comment 6 wewang 2016-01-18 23:33:30 EST
a. I tested in fedora , add BUILD_LOGLEVEL=8 to the strategy in the bc,found  io.openshift.build.commit.id,but when oc get build 

version:
devenv_fedora_3161
openshift v1.1-799-g097d340
kubernetes v1.1.0-origin-1107-g4c8e6f4
etcd 2.1.2
# oc get builds
NAME                  TYPE      FROM      STATUS     STARTED         DURATION
ruby-sample-build-1   Docker    Git       Complete   5 minutes ago   5m3s 

here is log:http://pastebin.test.redhat.com/341585
and bc content :http://pastebin.test.redhat.com/341586

b. I build code locally, also cannot get commit id when oc get build
Comment 7 Cesar Wong 2016-01-19 23:16:02 EST
@wewang can you also please include the log from the openshift master?
Comment 10 wewang 2016-01-20 20:46:13 EST
@Cesar Wong, I agree with you , maybe it's not enough time for commit info to be updated, you can move to ON_QA, thx

Note You need to log in before you can comment on or make changes to this bug.