Bug 1403712

Summary: [devexp_public_852]Cannot display failure reason when use incorrect sourcePath for extended build
Product: OKD Reporter: Wenjing Zheng <wzheng>
Component: BuildAssignee: Victor Ionut Palade <ipalade>
Status: CLOSED CURRENTRELEASE QA Contact: Wang Haoran <haowang>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, dyan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-30 12:48:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Wenjing Zheng 2016-12-12 09:16:51 UTC
Description of problem:
No failure reason display if use incorrect sourcePath for extended build:
- destinationDir: app
        sourcePath: /tmp123/i-am-runtime-artifact1.txt
$oc get builds
NAME                         TYPE      FROM          STATUS    STARTED          DURATION
extended-build-from-repo-1   Source    Git@7323f1a   Failed    29 seconds ago   5s

Version-Release number of selected component (if applicable):
oc v1.5.0-alpha.0+efa3100-334
kubernetes v1.4.0+776c994
openshift v1.5.0-alpha.0+efa3100-334
kubernetes v1.4.0+776c994

How reproducible:
always

Steps to Reproduce:
1. Create a project
2. Edit template to use incorrect sourcePath for extended build
https://raw.githubusercontent.com/wzheng1/test-for-s2i-extendbuild/master/extended-bc-scripts-in-repo.json
3. Start build
4. Check build status
$ oc get builds

Actual results:
4.No failure reason
NAME                         TYPE      FROM          STATUS    STARTED          DURATION
extended-build-from-repo-1   Source    Git@7323f1a   Failed    29 seconds ago   5s


Expected results:
4.Should have failure reason like other failure:
extended-build-from-repo-5   Source    Git@extendbuild-repo   Failed (PullRuntimeImageFailed)   2 minutes ago    2s

Additional info:

Comment 1 Victor Ionut Palade 2017-01-05 08:38:36 UTC
this bug will be fixed once this PR lands.
https://github.com/openshift/source-to-image/pull/673
and we do a rebase of source-to-image in origin

Comment 2 Victor Ionut Palade 2017-01-05 08:39:56 UTC
just a correction, the expected failure result, can't be pull runtime image failed. it's RuntimeArtifactsFetchFailed if you change sourcePath to an incorrect one.

Comment 3 Wenjing Zheng 2017-01-09 05:57:44 UTC
Verified on origin with below version:
openshift v1.5.0-alpha.1+15872c0-61
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0

[wzheng@openshiftqe test]$ oc get builds
NAME                         TYPE      FROM          STATUS                                 STARTED         DURATION
extended-build-from-repo-1   Source    Git@7323f1a   Failed (FetchRuntimeArtifactsFailed)   7 minutes ago   1m2s
[wzheng@openshiftqe test]$ oc describe builds extended-build-from-repo-1
Name:		extended-build-from-repo-1
Namespace:	wzheng1
Created:	8 minutes ago
Labels:		buildconfig=extended-build-from-repo
		openshift.io/build-config.name=extended-build-from-repo
		openshift.io/build.start-policy=Serial
Annotations:	openshift.io/build-config.name=extended-build-from-repo
		openshift.io/build.number=1
		openshift.io/build.pod-name=extended-build-from-repo-1-build

Status:		Failed (Failed to fetch specified runtime artifacts.)

@ipalade, you can change this bug to ON_QA now, thanks!