Bug 1122607

Summary: PHP Composer wipes out folder without rebuilding it
Product: OpenShift Online Reporter: Nick Harvey <niharvey>
Component: ImageAssignee: Maciej Szulik <maszulik>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.xCC: bparees, jokerman, mfojtik, mmccomas, niharvey
Target Milestone: ---Keywords: UpcomingRelease
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-30 14:48: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:
Embargoed:

Description Nick Harvey 2014-07-23 15:17:28 UTC
Description of problem:
A Openshift Online user reported the following:
It appears that pushing to OpenShift completely wipes out the vendors/ folder, and never rebuilds it.

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


How reproducible: Always


Steps to Reproduce:
0. Pre-Check: SSH’d in to live server - saw vendors/ folder was there (from my last manual composer install). Site loads fine with no problems.

1. Added a new dependency locally to composer.json and a created a simple script to test usage of said dependency. 

2. Added and committed all changes and pushed to OpenShift

3. Hit testing script to see if the dependency was working. It wasn’t and neither was the rest of the site. Looked at php.log and saw fatal errors because it couldn’t find needed files in vendor/

4. SSH’d into server and saw there was no longer a vendors/ folder in existence. 

Actual results: Pushing to OpenShift would delete the vendors/ folder and never rebuild it.


Expected results: Folder should remain intact


Additional info:

Comment 1 Maciej Szulik 2014-07-25 20:08:52 UTC
Nick, from your description I figured out following: 

The customer installed the PHP composer *manually* while being logged into 
the SSH console, and he installed all the dependencies while still SSH'd but
again *manually*. 
Then he made changes to composer.json on his local computer and committed it 
and pushed to OpenShift. In result, the directory with the application was 
recreated from scratch based on the current contents of the git repository. 
So any changes done manually will be lost. 

What he needs is to add use_composer marker (.openshift/markers/use_composer) 
and everything he'll be responsible for is writing the composer.json in 
project main directory, OpenShift will take care for all the dependency retrieval.

Comment 2 Nick Harvey 2014-07-30 14:48:09 UTC
Looks like that resolved it for the customer. Although they did mention that it was very slow. Not sure if that's related to gear size or not but still something to keep in mind. Thanks for your help!