Bug 1298861 - Cannot store commit id in sti and docker build
Summary: Cannot store commit id in sti and docker build
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Build
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Cesar Wong
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-15 09:42 UTC by wewang
Modified: 2016-05-12 17:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-12 17:13:45 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description wewang 2016-01-15 09:42:50 UTC
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 09:45:05 UTC
@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 15:49:59 UTC
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 18:23:03 UTC
PR here: https://github.com/openshift/origin/pull/6678

Comment 4 wewang 2016-01-18 10:09:02 UTC
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 15:25:47 UTC
@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-19 04:33:30 UTC
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-20 04:16:02 UTC
@wewang can you also please include the log from the openshift master?

Comment 10 wewang 2016-01-21 01:46:13 UTC
@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.