Bug 1258724

Summary: Deployment is triggered even no triggers are defined on a deployment configuration
Product: OKD Reporter: Xingxing Xia <xxia>
Component: DeploymentsAssignee: Dan Mace <dmace>
Status: CLOSED CURRENTRELEASE QA Contact: Yan Du <yadu>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, ccoleman, wsun
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-08 20:14:10 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:
Embargoed:

Description Xingxing Xia 2015-09-01 06:13:16 UTC
Description of problem:
When creating a DeploymentConfig on which no triggers are defined, a deployment should not be created automatically.

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

How reproducible:
Always


Steps to Reproduce:
1. oc login and create your own project
# oc login
# oc new-project prjtest

2. Create dc according the given json file below and check the dc status
# oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/deployment/manual.json
# oc deploy hooks
# oc get dc hooks

Actual results:
2.
# oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/deployment/manual.json
deploymentconfig "hooks" created
# oc deploy hooks
hooks #1 deployment running for 10 seconds - 1 pod
# oc get dc hooks
NAME      TRIGGERS       LATEST VERSION
hooks     ConfigChange   1

Expected results:
2.
# oc deploy hooks
hooks #1 deployment waiting for manual
# oc get dc hooks
NAME      TRIGGERS   LATEST VERSION
hooks                0


Additional info:

Comment 1 Dan Mace 2015-09-01 13:53:07 UTC
As of this commit:

https://github.com/openshift/origin/commit
/654eff61d660d15ccab866e9cd7452b206010220

configChange is the default when triggers are ommitted. To specify no triggers, add `triggers: []` to the json.

Comment 2 Dan Mace 2015-09-01 14:00:05 UTC
Related: https://github.com/openshift/origin/pull/4446

Comment 3 Xingxing Xia 2015-09-06 03:33:15 UTC
Verified against  devenv_fedora_2287. Actual result is: when triggers are ommitted, it defaults to CongfigChange. If specify 'triggers: []', it means really to specify no triggers, and need manual deployment.