Bug 1072959

Summary: Deployment of the irrelevant artifact via REST does not break the app
Product: OpenShift Online Reporter: Oleg Fayans <ofayans>
Component: MasterAssignee: Dan McPherson <dmcphers>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.xCC: amarecek, dmcphers
Target Milestone: ---Keywords: UpcomingRelease
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-09 20:08:01 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 Oleg Fayans 2014-03-05 13:37:43 UTC
Description of problem:
When I deploy an artifact of php app to the ruby app via REST, it reports, that deployment was successful, tells me the deployment ID, but actually does not change any files in the target app. It should report an error during the deployment itself

Version-Release number of selected component (if applicable):
devenv_4466 (ami-0b5e5262)

How reproducible:
always

Steps to Reproduce:
1. create a ruby app
2. make a snapshot: rhc snapshot-save -a <app_name> --deployment
3. upload the snapshot tarball to some public webserver
4. create a php (or python, perl, etc) app, named "app2"
5. Try to deploy the artifact:
curl -k -X POST https://ec2-54-211-200-105.compute-1.amazonaws.com/broker/rest/application/5317259e8351ff670e0000a6/deployments -d artifact_url=<url_of_artifact> -u yourusername:password

Actual results:

{"api_version":1.6,"data":{"activations":["2014-03-05T13:25:46Z"],"created_at":"2014-03-05T13:25:31Z","force_clean_build":false,"hot_deploy":false,"id":"091e4475","ref":"master","sha1":"6754353"},"messages":[["exit_code":0,"field":null,"index":null,"severity":"info","text":"Added 091e4475 to application app2"}],"status":"created","supported_api_versions":[1.0,1.1,1.2,1.3,1.4,1.5,1.6],"type":"deployment","version":"1.6"}

Expected results:
Should throw an error

Additional info:

Comment 1 Dan McPherson 2014-03-09 20:08:01 UTC
I got the same results except the app was updated for me.  The php app now has the contents of the ruby repo.  The php app also doesn't work with the ruby contents:

[root@ip-10-79-154-41 app1-danmcp1]# ls
app-deployments  app-root  git  php
[root@ip-10-79-154-41 app1-danmcp1]# ls app-root/repo/
config.ru  public  README.md  tmp

[root@ip-10-79-154-41 app1-danmcp1]# curl app1-danmcp1.dev.rhcloud.com
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL / was not found on this server.</p>
<hr>
<address>Apache/2.2.15 (Red Hat) Server at app1-danmcp1.dev.rhcloud.com Port 80</address>
</body></html>


The behavior I see is as designed.  Are you sure your php app wasn't updated with the contents of the ruby app?