Bug 1419810 - No failure reason displayed when build failed using invalid contextDir
Summary: No failure reason displayed when build failed using invalid contextDir
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Build
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Corey Daley
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-07 06:29 UTC by Wang Haoran
Modified: 2017-07-24 14:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Build failure reason was not getting set/saved correctly Consequence: Build failure reason could not be shown in command output Fix: Updated code to correctly save build failure reason Result: Build failure reason now shows correctly in command output
Clone Of:
Environment:
Last Closed: 2017-04-12 19:11:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0884 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.5 RPM Release Advisory 2017-04-12 22:50:07 UTC

Description Wang Haoran 2017-02-07 06:29:12 UTC
Description of problem:
No failure reason displayed when using invalid branch

Version-Release number of selected component (if applicable):
openshift v3.5.0.17+c55cf2b
kubernetes v1.5.2+43a9be4
etcd 3.1.0


How reproducible:

always
Steps to Reproduce:
1.oc new-app -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/build/ruby20rhel7-invalidcontext-docker.json
2.oc get build
oc get build
NAME                    TYPE      FROM          STATUS    STARTED          DURATION
ruby20-sample-build-1   Docker    Git@4e7c264   Failed    10 minutes ago   2s

3.

Actual results:


Expected results:
We should have reason telling the use why failed

Additional info:

Comment 1 Corey Daley 2017-02-08 21:34:46 UTC
Submitted PR https://github.com/openshift/origin/pull/12873

Comment 2 Corey Daley 2017-02-17 20:59:52 UTC
https://github.com/openshift/origin/pull/12873

Comment 3 Troy Dawson 2017-02-21 22:38:04 UTC
This has been merged into ocp and is in OCP v3.5.0.32 or newer.

Comment 5 Wang Haoran 2017-03-01 05:38:27 UTC
Failed with :
openshift v3.5.0.35
kubernetes v1.5.2+43a9be4
etcd 3.1.0


 oc get build
NAME                    TYPE      FROM          STATUS    STARTED         DURATION
ruby20-sample-build-1   Docker    Git@4e7c264   Failed    3 minutes ago   1s
ruby20-sample-build-2   Docker    Git@4e7c264   Failed    2 minutes ago   1s

Error logs:
F0301 05:35:13.756573       1 helpers.go:116] error: build error: open /tmp/docker-build771301835/invalid/Dockerfile: no such file or directory

Comment 6 Corey Daley 2017-03-03 15:09:31 UTC
Should be fixed now by https://github.com/openshift/origin/pull/13203

Comment 7 Troy Dawson 2017-03-03 17:54:40 UTC
Correy, origin-1.5 / ose-3.5 has already branched.  So pull requests for master are for 3.6 now.
Can you please backport this to the origin-1.5 branch so it can be merged into ose 3.5.

Comment 8 Corey Daley 2017-03-03 19:53:10 UTC
Troy, 
This one was submitted about the same time and has been merged: https://github.com/openshift/origin/pull/13206

Comment 9 Troy Dawson 2017-03-03 20:18:11 UTC
Thank you, I didn't see that.
This has been merged into ocp and is in OCP v3.5.0.38 or newer.

Comment 10 Wenjing Zheng 2017-03-08 02:52:26 UTC
Verified with below version: 
openshift v3.5.0.45
kubernetes v1.5.2+43a9be4
etcd 3.1.0

$ oc get builds
NAME                    TYPE      FROM      STATUS                             STARTED              DURATION
ruby20-sample-build-1   Docker    Git       Failed (InvalidContextDirectory)   About a minute ago   
[wzheng@openshiftqe v3]$ oc describe builds ruby20-sample-build-1
Name:		ruby20-sample-build-1
Namespace:	wzheng2
Created:	About a minute ago
Labels:		app=ruby-helloworld-sample
		buildconfig=ruby20-sample-build
		name=ruby20-sample-build
		openshift.io/build-config.name=ruby20-sample-build
		openshift.io/build.start-policy=Serial
		template=application-template-dockerbuild
Annotations:	openshift.io/build-config.name=ruby20-sample-build
		openshift.io/build.number=1
		openshift.io/build.pod-name=ruby20-sample-build-1-build

Status:		Failed (The supplied context directory does not exist.)

Comment 12 errata-xmlrpc 2017-04-12 19:11:54 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


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