Bug 1261451 - trigger type in buildconfig can be updated and saved with invalid value
trigger type in buildconfig can be updated and saved with invalid value
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Build (Show other bugs)
3.x
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Cesar Wong
Wenjing Zheng
: Regression, Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-09 07:05 EDT by chaoyang
Modified: 2015-11-23 16:15 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-23 16:15:33 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description chaoyang 2015-09-09 07:05:57 EDT
Description of problem:
trigger type in buildconfig can be updated and saved  with invalid value

Version-Release number of selected component (if applicable):
openshift v1.0.5-301-ge61cc31
kubernetes v1.1.0-alpha.0-1605-g44c91b1

How reproducible:
Always

Steps to Reproduce:
1.create a project
oc process -f https://raw.githubusercontent.com/openshift/origin/master/examples/sample-app/application-template-stibuild.json | oc create -f -

2.oc edit bc ruby-sample-build
3.Edit trigger type and save

triggers:
  - github:
      secret: secret101
    type: GitHub123
  - generic:
      secret: secret101
    type: Generic123
  - imageChange:
      lastTriggeredImageID: openshift/ruby-20-centos7:latest
    type: ImageChange123

Actual results:
trigger type could be updated and saved

Expected results:

warning appears and it cannot be saved
BuildConfig ruby-sample-build was not valid:
# * triggers[0].type: invalid value 'GitHub123': invalid trigger type
# * triggers[1].type: invalid value 'Generic123': invalid trigger type
# * triggers[2].type: invalid value 'ImageChange123': invalid trigger type
Additional info:
Comment 1 Cesar Wong 2015-09-09 09:07:46 EDT
This is working as designed. We removed validation for trigger type because we make the server incompatible with future clients. An example is the recent addition of the ConfigChange trigger type. Because we are now adding it to BuildConfigs generated in the UI and in new-app, those clients are no longer compatible with previous versions of the server that did not recognize the ConfigChange type. Moving forward, if there are types we don't recognize, we'll simply ignore them.
Comment 2 chaoyang 2015-09-10 07:26:54 EDT
this bug is by designed, will update the test case

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