Bug 1534916 - oc new-app with different way of parameter passing should have consistent behavior
Summary: oc new-app with different way of parameter passing should have consistent beh...
Keywords:
Status: CLOSED DUPLICATE of bug 1470374
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Build
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Mangirdas Judeikis
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-16 09:45 UTC by shahan
Modified: 2018-04-26 12:40 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-26 12:40:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description shahan 2018-01-16 09:45:38 UTC
Description of problem:
 oc new-app with the different way of parameter passing should have consistent behavior

Version-Release number of selected component (if applicable):

oc v3.9.0-0.16.0
kubernetes v1.9.0-beta1
features: Basic-Auth GSSAPI Kerberos SPNEGO

How reproducible:
Always

Steps to Reproduce:
1. oc new-app openshift/ruby:latest~https://github.com/openshift/fakerepo.git 
2. oc new-app --image-stream=openshift/ruby:latest --code=https://github.com/openshift/fakerepo.git
3.

Actual results:
1. Could build up the components of an application successfully without GitHub user/password
2. need GitHub user/password
Expected results:
These two ways should have consistent behavior.

Additional info:

Comment 1 Ben Parees 2018-01-16 14:09:48 UTC
Since it wasn't clear to me.. the issue here is not that the app ultimately doesn't build, it's that in (1) the components of the app are successfully created (even though the repo does not exist) and in (2) the components are not created because we can't clone the repo.

MJ, I think this is related to https://bugzilla.redhat.com/show_bug.cgi?id=1470374

Comment 2 Mangirdas Judeikis 2018-01-16 14:42:24 UTC
It might be solved already. I will check and confirm.

Comment 3 Mangirdas Judeikis 2018-04-16 13:11:36 UTC
I suspect the problem root cause is similar. Its problem here: https://github.com/openshift/origin/blob/master/pkg/git/repository.go#L228

So its different issue, but same "source code detection flow".

We can work it by adding some error checking here: 
https://github.com/openshift/origin/blob/master/pkg/oc/generate/cmd/resolve.go#L264

Which would "/dev/null" errors, if they come from certain git behavior. In example:
1. No git available.
2. Remote repo is secure.

Any other errors would be threaded as normal errors and passed down the stream for proper handling. 

Overall some of the oc & git interaction should be revisited?

Comment 4 Mangirdas Judeikis 2018-04-16 13:17:52 UTC
doing a small bugfix, which might solve this too https://bugzilla.redhat.com/show_bug.cgi?id=1470374

Comment 5 Ben Parees 2018-04-26 12:40:52 UTC

*** This bug has been marked as a duplicate of bug 1470374 ***


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