Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The deployer tool does not handle symlinks correctly, fails silently. #10292

Open
andrewhowdencom opened this issue Jul 20, 2017 · 21 comments
Open
Labels
Area: Install & Administer Component: Other Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: ready for dev Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.

Comments

@andrewhowdencom
Copy link
Contributor

Preconditions

  1. 2.1.7
  2. php7.0

Steps to reproduce

  1. Clone an existing site, having previously been installed and committed to vcs, but without the vendored dependencies.
  2. rm -rf media, and create a symlink that points to /tmp/thisdoesnotexist
  3. Try and install the application

Expected result

  1. The application install fails critically

Actual result

  1. The application install appears to succeed, but the files boostrap.php etc. are missing.

See the following stack overflow post for further details. https://magento.stackexchange.com/questions/177924/magenta-2-1-5-composer-install-fails-to-generate-all-files/184666#184666

@magento-engcom-team magento-engcom-team added G1 Passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed G1 Passed labels Sep 5, 2017
@magento-engcom-team
Copy link
Contributor

@andrewhowdencom, thank you for your report.
We were not able to reproduce this issue by following the steps you provided. Please provide more detailed steps to reproduce.

@andrewhowdencom
Copy link
Contributor Author

andrewhowdencom commented Dec 4, 2017

Edit: I have removed my initial and unfair reply. I'm sorry for it's venom.

To assist me in helping you debug this, can you please articulate the steps you took to correct the issue? In particular, I have noted the problem in some detail here:

https://magento.stackexchange.com/questions/177924/magento-2-1-5-composer-install-fails-to-generate-all-files/184666#184666?

Can you reiterate the steps that you followed in line with the above article?

@p-bystritsky p-bystritsky added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed and removed Progress: needs update labels Dec 12, 2017
@ghost ghost self-assigned this Aug 17, 2018
@ghost
Copy link

ghost commented Aug 17, 2018

@andrewhowdencom, we were not able to reproduce this issue by following the steps you provided. Please provide more detailed steps to reproduce.

@andrewhowdencom
Copy link
Contributor Author

Hola @engcom-backlog-pb this is a particularly expensive issue to debug, and I don't have any reason to do it at the minute. Can you clarify the exact steps that you attempted, as asked before?

Cheers,

@ghost
Copy link

ghost commented Aug 20, 2018

@andrewhowdencom

  1. Clone magento 2 from repository.
  2. cd pub
  3. rm -rf media
  4. ln -s /tmp/thisdoesnotexist/media
  5. Install the application

@andrewhowdencom
Copy link
Contributor Author

Install the application

By this I guess you mean composer install?

@ghost
Copy link

ghost commented Aug 21, 2018

@andrewhowdencom
No, install through command line.

@andrewhowdencom
Copy link
Contributor Author

@ghost
Copy link

ghost commented Aug 27, 2018

Try and install the application

by install i mean composer install

@andrewhowdencom, please provide obvious Steps to Reproduce.

@andrewhowdencom
Copy link
Contributor Author

Hi @engcom-backlog-pb;

I don't work on any Magneto 2 stuff at the minute, so will not go through the process of exhaustively documenting this. However, broadly it's:

  1. Install Magento as specified in https://devdocs.magento.com/guides/v2.3/install-gde/composer.html

Normally you'd commit this and save it somewhere as the basis of a new site, but not required for this issue.

  1. Delete everything that's git ignore. vendor, stuff in web etc.
  2. rm -rf and symlink pub/media to /tmp/thisdoesnotexist. This pattern is pretty common for installing applications without downtime; see Capistrano
  3. composer install again. Here is the silent failure. You'll find that not all files are correctly duplicated out of the vendor/ tree into the application root.

Using composer install -vvv also shows the issue, but it doesn't exit nonzero so the installation is a "success"

I'll pass this issue onto others who it might affect, see if they're interested in following it up further.

@ghost
Copy link

ghost commented Aug 30, 2018

Hello @andrewhowdencom

Install Magento as specified in https://devdocs.magento.com/guides/v2.3/install-gde/composer.html

Do I need to install or only create-project?

Delete everything that's git ignore. vendor, stuff in web etc.

When we are installing Magento using Composer, git is not used.

duplicated out of the vendor/ tree into the application root.

As I know, code is never duplicated or copied from vendor/ to app/code/ dir.

I have tried many to replicate this issue in many different ways, but only
Missing write permissions to the following paths: /var/www/html/magento-composer/pub/media
exception happens.

@andrewhowdencom
Copy link
Contributor Author

Do I need to install or only create-project?

I think create-project does the initial installation

Delete everything that's git ignore. vendor, stuff in web etc.

Yes, I understand it doesn't imply it -- but usually whenever I start a project, the first thing I do is commit it to version control. It's like:

1. composer create-project
2. git init .
3. git add .
4. git commit -m "Initial Commit"
5. git push foo/bar

Then, in a new dir,

1. git clone foo/bar
2. ln -s media /tmp/nonexist
3. composer install

In that case, everything in .gitignore in the composer projects will not be present, by virtue of cloning the repository from upstream again.

It's in this case it should fail.

@ghost ghost removed the Progress: needs update label Aug 31, 2018
@ghost
Copy link

ghost commented Aug 31, 2018

@andrewhowdencom
Now Steps to Reproduce seems to be clear, but I cannot reproduce this issue.
I've tested on 2.1.7 and 2.2.5.

@ghost
Copy link

ghost commented Sep 14, 2018

@andrewhowdencom, we are closing this issue due to inactivity. If you'd like to update it, please reopen the issue.

@ghost
Copy link

ghost commented Apr 17, 2019

Hi @hostep, do we need to open this issue in magento-composer-installer repo ? as this not related to this github repo codebase ?

@hostep
Copy link
Contributor

hostep commented Apr 17, 2019

@engcom-backlog-nazar: unfortunately issue reporting was disabled on https://github.com/magento/magento-composer-installer, only PR's are allowed there.
I think we can keep it over here.

@ghost
Copy link

ghost commented Apr 17, 2019

@hostep ok, i was not seeing that there are no issue tab . 👍

@ghost ghost added Component: Other Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Apr 17, 2019
@ghost ghost removed their assignment Apr 18, 2019
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-backlog-nazar
Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-99260, MAGETWO-99261 were created

Issue Available: @engcom-backlog-nazar, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Apr 18, 2019
@magento-engcom-team magento-engcom-team added this to Ready for Dev in Community Backlog Mar 24, 2020
@sidolov sidolov added this to Ready for Grooming in Low Priority Backlog Sep 3, 2020
@sidolov sidolov added this to Ready for Development in Low Priority Backlog Sep 24, 2020
@ghost ghost removed this from Ready for Dev in Community Backlog Oct 20, 2020
@ghost ghost removed this from Ready for Development in Low Priority Backlog Oct 20, 2020
@ghost ghost removed Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development labels Oct 20, 2020
@magento-engcom-team magento-engcom-team added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. labels Nov 30, 2020
@m2-community-project m2-community-project bot added this to Ready for Development in High Priority Backlog Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Install & Administer Component: Other Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: ready for dev Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.
Projects
High Priority Backlog
  
Ready for Development
Development

No branches or pull requests

7 participants