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

lando pull for lagoon results in files nested too deeply #3059

Closed
owenbush opened this issue Jun 24, 2021 · 0 comments
Closed

lando pull for lagoon results in files nested too deeply #3059

owenbush opened this issue Jun 24, 2021 · 0 comments
Labels
bug Something aint working right! lagoon Deals with the Lagoon recipe
Projects

Comments

@owenbush
Copy link
Contributor

Tell us about your setup

What is your lando version and operating system?

v3.1.4 on Mac OSX 11.4 (Big Sur)

Tell us about your .lando.yml

Paste in the contents of your .lando.yml this is SUPER HELPFUL for us.

name: drupal-example-3
recipe: lagoon
config:
  flavor: drupal
  build:
    - composer install

Tell us about the command you were running

lando pull 

Tell us about the error you got

I didn't receive an error per-se. The lando pull command (when opting to pull files from Lagoon) executed properly, but the files ended up in the wrong place.

lando pull                                                                                                                                                                      ✔  1m 17s
? Pull database from? drupal-example-3-main
? Pull files from? drupal-example-3-main
Refreshing aliases...
Validating database alias @lagoon.drupal-example-3-main exists and you have access to it...
Database alias @lagoon.drupal-example-3-main access confirmed!
Destroying all current tables in database if needed...
Pulling your database... This miiiiight take a minute
> > mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces
Validating file alias @lagoon.drupal-example-3-main exists and you have access to it...
Files alias @lagoon.drupal-example-3-main access confirmed!
Attemping to sync files to/from directory: /app/web/sites/default/files

 // Copy new and override existing files at /app/web/sites/default/files. The source is
 // drupal-example-3-main@ssh.lagoon.amazeeio.cloud:/app/web/sites/default/files?: yes.

Pull completed successfully!

Tell us generally about your bug

The expectation would be that web/sites/default/files would contain the files from the environment the files are pulled from. However, it appears that the files actually end up in ``web/sites/default/files/files` so a files directory within the files directory.

 ls -lah web/sites/default/files                                                                                                                                                     ✔  8s
total 8
drwxrwxrwx@  7 owen  staff   224B Jun 24 15:47 .
drwxr-xr-x@ 10 owen  staff   320B Jun 24 15:45 ..
-r--r--r--@  1 owen  staff   487B Jun 24 15:45 .htaccess
drwxrwxr-x  10 owen  staff   320B Jun 24 15:49 css
drwxrws--x  29 owen  staff   928B Jun  5 08:58 files
drwxrwxr-x   6 owen  staff   192B Jun 24 15:49 js
drwxrwxrwx@  3 owen  staff    96B Jun 24 15:49 php

and then:

 ls -lah web/sites/default/files/files                                                                                                                                                    ✔
total 3496
drwxrws--x  29 owen  staff   928B Jun  5 08:58 .
drwxrwxrwx@  7 owen  staff   224B Jun 24 15:47 ..
-r--r--r--   1 owen  staff   487B Jun  5 08:50 .htaccess
-rw-rw-r--   1 owen  staff    98K Jun  5 08:52 chili-sauce-umami.jpg
-rw-rw-r--   1 owen  staff    30K Jun  5 08:52 chocolate-brownie-umami.jpg
-rw-rw-r--   1 owen  staff    61K Jun  5 08:52 crema-catalana-umami.jpg
drwxrwxr-x  48 owen  staff   1.5K Jun 19 20:55 css
-rw-rw-r--   1 owen  staff    36K Jun  5 08:52 heritage-carrots.jpg
-rw-rw-r--   1 owen  staff   112K Jun  5 08:52 home-grown-herbs.jpg
drwxrwxr-x  26 owen  staff   832B Jun 19 20:55 js
drwxrwxr-x   3 owen  staff    96B Jun  5 08:50 media-icons
-rw-rw-r--   1 owen  staff    69K Jun  5 08:52 mediterranean-quiche-umami.jpg
-rw-rw-r--   1 owen  staff    49K Jun  5 08:52 mojito-mocktail.jpg
-rw-rw-r--   1 owen  staff    91K Jun  5 08:52 mushrooms-umami.jpg
-rw-rw-r--   1 owen  staff    74K Jun  5 08:52 oatmeal-fruit-syrup-topping.jpg
drwxrwxrwx   2 owen  staff    64B Jun 24 15:46 php
-rw-rw-r--   1 owen  staff    79K Jun  5 08:52 pizza-umami.jpg
drwxrwxr-x   6 owen  staff   192B Jun  5 08:58 styles
-rw-rw-r--   1 owen  staff    98K Jun  5 08:52 supermarket-savvy-umami.jpg
-rw-rw-r--   1 owen  staff    38K Jun  5 08:52 thai-green-curry-umami.jpg
drwxrwxr-x   4 owen  staff   128B Jun 19 20:55 translations
-rw-rw-r--   1 owen  staff    30K Jun  5 08:52 umami-bundle.png
-rw-rw-r--   1 owen  staff   256K Jun  5 08:52 vegan-brownies-hero-umami.jpg
-rw-rw-r--   1 owen  staff   107K Jun  5 08:52 vegan-chocolate-nut-brownies.jpg
-rw-rw-r--   1 owen  staff    64K Jun  5 08:52 vegan-chocolate.jpg
-rw-rw-r--   1 owen  staff   221K Jun  5 08:52 veggie-pasta-bake-hero-umami.jpg
-rw-rw-r--   1 owen  staff   100K Jun  5 08:52 veggie-pasta-bake-umami.jpg
-rw-rw-r--   1 owen  staff    64K Jun  5 08:52 victoria-sponge-umami.jpg
-rw-rw-r--   1 owen  staff    30K Jun  5 08:52 watercress-soup-umami.jpg

Tell us more

I believe this issue is caused by simply missing off two slashes on the drush rsync command in integrations/lando-lagoon/scripts/lagoon-pull.sh

This:

LANDO_SSH_KEY=${LANDO_SSH_KEY} drush rsync "@${LANDO_FILES_ALIAS}":${DRUPAL_FILES_PATH} ${DRUPAL_FILES_PATH} -y

should be

LANDO_SSH_KEY=${LANDO_SSH_KEY} drush rsync "@${LANDO_FILES_ALIAS}":${DRUPAL_FILES_PATH}/ ${DRUPAL_FILES_PATH}/ -y

I have tested this with a local lando.dev and it seems to be working nicely.

@owenbush owenbush added the bug Something aint working right! label Jun 24, 2021
owenbush added a commit to owenbush/cli that referenced this issue Jun 24, 2021
@owenbush owenbush changed the title lando pull for lagoon results in files ended up nested too deeply lando pull for lagoon results in files nested too deeply Jun 24, 2021
@pirog pirog added the lagoon Deals with the Lagoon recipe label Jun 30, 2021
@pirog pirog added this to New issues in Lagoon via automation Jun 30, 2021
Lagoon automation moved this from New issues to Done Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something aint working right! lagoon Deals with the Lagoon recipe
Projects
No open projects
Development

No branches or pull requests

2 participants