Bug 1395109

Summary: [ded_int_gcp] Build spec.source.type:Git can be updated
Product: OpenShift Online Reporter: yufchang <yufchang>
Component: BuildAssignee: Ben Parees <bparees>
Status: CLOSED WONTFIX QA Contact: Wang Haoran <haowang>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.xCC: aos-bugs, bparees
Target Milestone: ---Keywords: UpcomingRelease
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: 2016-11-15 17:39:07 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 yufchang 2016-11-15 07:58:10 UTC
Description of problem:
User can modify Build spec.source.type:Git and it can be saved.

Version-Release number of selected component (if applicable):
openshift v3.3.1.3
kubernetes v1.3.0+52492b4

How reproducible:
1.Create a new project;
2.oc new-app https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/image/language-image-templates/php-56-rhel7-stibuild.json
3.From web console to try to modify bc "php-sample-build",click action->Edit Yaml to modify like the following:
spec:
..............
source:
    git123:
      uri: https://github.com/wzheng1/php-example-app
    type: Git123
4.Click Save



Actual results:

php-sample-build was updated. Infomation in BC is like:
source:
    type: None


Expected results:
BuildConfig  "php-sample-build" is invalid: spec.source.type:  Invalid value: "Git123".

Additional info:
The same with use of  "oc edit bc".

Comment 1 Cesar Wong 2016-11-15 14:01:30 UTC
This is not a regression as far as I can tell. Moving to UpcomingRelease.

Comment 2 Ben Parees 2016-11-15 17:39:07 UTC
adding validation for this is problematic since it can cause failures for users who currently have an invalid type value (an invalid type value isn't a "problem" today since the type field is ignored).

going to close this as won't fix and we'll be getting rid of the type field once we have a v2 api.