Hide Forgot
Description of problem: When using oc edit to update the bc, and fill with the wrong type , when type :wq , vim exited successfully. Version-Release number of selected component (if applicable): openshift v3.2.0.20 kubernetes v1.2.0-36-g4a3f9c5 etcd 2.2.5 How reproducible: always Steps to Reproduce: 1.Create a project 2.Create a app oc process -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/image/language-image-templates/php-56-rhel7-stibuild.json| oc create -f - 3.edit the bc update the source type to Git123 oc edit bc php-sample-build spec: .............. source: git: uri: https://github.com/wzheng1/php-example-app type: Git123 4. edit bc update the build strategy to Source123 strategy: sourceStrategy: from: kind: ImageStreamTag name: php-56-rhel7:latest type: Source123 Actual results: step 3 and 4 succeed. Expected results: Should not save sucessfully and pop out the wrong message,validation should be more restrict. Additional info: There is a bug before https://bugzilla.redhat.com/show_bug.cgi?id=1279288 , which fixed this , but after update the bc structure , It appears again. code here: https://github.com/openshift/origin/blob/master/pkg/build/api/validation/validation.go#L373 https://github.com/openshift/origin/blob/master/pkg/build/api/validation/validation.go#L132
According to this commit[1], disable the type validation is to support multiple source input , if this is not a bug , feel free to close this. [1]https://github.com/openshift/origin/commit/6d31fd277df0632bbb96ecea64e79d10b7e55d27
That field is now deprecated, so you can put any value you want into it, it will be ignored and you'll notice that when you view the buildconfig again, the type field will be reset to the appropriate value based on which strategy field is defined.