Bug 1122607 - PHP Composer wipes out folder without rebuilding it
Summary: PHP Composer wipes out folder without rebuilding it
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: x86_64
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Maciej Szulik
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-23 15:17 UTC by Nick Harvey
Modified: 2015-05-15 00:44 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-30 14:48:09 UTC


Attachments (Terms of Use)

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!


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