Bug 1017624

Summary: [deploy] Unable to git push when binary deployment is enabled but auto deployment is disabled
Product: OpenShift Online Reporter: Jianwei Hou <jhou>
Component: ContainersAssignee: Jhon Honce <jhonce>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: agoldste
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: 2013-10-10 13:33:09 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 Jianwei Hou 2013-10-10 09:02:26 UTC
Description of problem:
If an application is configured as binary deployment with auto deployment disabled, when push commits to remote, the push action is rejected with message 'git-based deployments are disabled'. However, now that auto deployment is disabled, I should not expect to see the platform's attempt to deploy my application.

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

How reproducible:
Always

Steps to Reproduce:
1. Create an application, disable auto deployment and configure binary deployment via rest api
rhc create-app p1 php-5.3
curl -s -k -H 'Content-Type: Application/json' --user jhou:x https://ec2-54-224-45-70.compute-1.amazonaws.com/broker/rest/domain/jhou/application/p1 -X PUT -d '{"auto_deploy": false}'
curl -s -k -H 'Content-Type: Application/json' --user jhou:x https://ec2-54-224-45-70.compute-1.amazonaws.com/broker/rest/domain/jhou/application/p1 -X PUT -d '{"deployment_type":"binary"}'

2. Do some change to the application code, then commit and push


Actual results:
After step 2:
Writing objects: 100% (4/4), 376 bytes | 0 bytes/s, done.
Total 4 (delta 2), reused 0 (delta 0)
remote: OPENSHIFT_DEPLOYMENT_TYPE is 'binary' - git-based deployments are disabled.
remote: 
To ssh://525642d7883414c514000071.rhcloud.com/~/git/p1.git/
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'ssh://525642d7883414c514000071.rhcloud.com/~/git/p1.git/'


Expected results:
The attempt is to push code without deploy hooks triggered, but the message shows the platform reject git deployment.  Maybe I should expect a successful git pushing without git deployment. 

Additional info:

Comment 1 Andy Goldstein 2013-10-10 13:33:09 UTC
This is behaving as intended. If you set the application's deployment type to binary, git pushes are rejected.