Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1278007 - --commit in start-build cmd do not work
Summary: --commit in start-build cmd do not work
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: Michal Fojtik
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-04 14:35 UTC by XiuJuan Wang
Modified: 2016-05-12 17:14 UTC (History)
4 users (show)

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


Attachments (Terms of Use)

Description XiuJuan Wang 2015-11-04 14:35:38 UTC
Description of problem:
Specify --commit with older commit id, but this option always uses the latest commit id in start-build cmd.

Version-Release number of selected component (if applicable):
oc v1.0.7-131-g2c6234e
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4

How reproducible:
always


Steps to Reproduce:
1.Check git log in source code repo
2.Start a build with --commit with a older commit id
3.

Actual results:
1.[fedora@ip-172-18-0-98 ruby-hello-world]$ git log
commit 65b3d6b82c299ac45ae8d1b698a2b233455b554d
Merge: f80663f b7309d9
Author: Jakub Hadvig <jhadvig@redhat.com>
Date:   Wed Jul 29 14:28:21 2015 +0200

    Merge pull request #47 from voxik/patch-1
    
    Fix Ruby 2.2 compatibility

commit b7309d9a78a3a6b10c30b830025ebffe30c500e4
Author: Vít Ondruch <v.ondruch@tiscali.cz>
Date:   Wed Jul 29 11:54:26 2015 +0200

    Fix Ruby 2.2 compatibility
    
    json-1.8.1 fails to build with Ruby 2.2:
    
    In file included from generator.c:1:0:
    ../fbuffer/fbuffer.h: In function 'fbuffer_to_s':
    ../fbuffer/fbuffer.h:175:47: error: macro "rb_str_new" requires 2 arguments, but only 1 given
         VALUE result = rb_str_new(FBUFFER_PAIR(fb));
-----------------<skip>---------------------------

2.#oc start-build ruby-sample-build  --from-repo=../ruby-hello-world --commit=b7309d9a78a3a6b10c30b830025ebffe30c500e4
Uploading Git repository "../ruby-hello-world" at commit "65b3d6b82c299ac45ae8d1b698a2b233455b554d" as binary input for the build ...
ruby-sample-build-2



Expected results:
Should use the specify commit id

Additional info:

Comment 1 Michal Fojtik 2015-11-05 15:05:00 UTC
I'm looking at this.

Comment 2 Michal Fojtik 2015-11-05 15:29:32 UTC
Fixed here: https://github.com/openshift/origin/pull/5734

Comment 3 openshift-github-bot 2015-11-13 17:54:00 UTC
Commit pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/22e71df69573a3a07b5241e565c4734fa68e18a1
Bug 1278007 - Use commit instead of HEAD when streaming in start-build

Comment 4 Michal Fojtik 2015-12-17 14:43:21 UTC
Hups, forgot to set ON_QA

Comment 5 XiuJuan Wang 2015-12-18 08:04:11 UTC
Verified this bug with devenv-rhel_2965
oc v1.1-477-g0d4de0b
kubernetes v1.1.0-origin-1107-g4c8e6f4



Senario 1 : start build with a specify commit id
oc start-build ruby-hello-world  --from-repo=../ruby-hello-world  --commit=e0e69bb7282403497f9e535e24d6100991c6bca5 -n xiuwang
Uploading "../ruby-hello-world" at commit "e0e69bb7282403497f9e535e24d6100991c6bca5" as binary input for the build ...
ruby-hello-world-3

Senario 2: start build with non-existing  commit id

# oc  start-build ruby-hello-world   --commit=1234 -n xiuwang --follow
ruby-hello-world-5
error: pathspec '1234' did not match any file(s) known to git.
F1218 08:02:55.513960       1 builder.go:59] Build error: exit status 1


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