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

Drush 9 installed instead of 8 #1543

Closed
travis-bradbury opened this issue Mar 20, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@travis-bradbury
Copy link
Contributor

commented Mar 20, 2019

Tell us about your setup

What is your lando version and operating system?

v3.0.0-rc.14 on Ubuntu 18.04.2

Tell us about your .lando.yml

name: test
recipe: drupal7
config:
  drush: 8

Tell us about the command you were running

Paste in a series of commands that caused the bug.

# Created my lando file as above.
$ lando start
Let's get this party started! Starting app..
landoproxyhyperion5000gandalfedition_proxy_1 is up-to-date
Creating network "test_default" with the default driver
Creating volume "test_data_appserver" with default driver
Creating volume "test_home_appserver" with default driver
Creating volume "test_data_database" with default driver
Creating volume "test_home_database" with default driver
Pulling appserver (devwithlando/php:7.2-apache-2)...
7.2-apache-2: Pulling from devwithlando/php
f7e2b70d04ae: Already exists
744aedb7995c: Pull complete
07afe22f8a58: Pull complete
c7bf4f31c4a4: Pull complete
b528e75732cc: Pull complete
27e7d214ded2: Pull complete
894549c23c16: Pull complete
9aa6d55932b2: Pull complete
1b27fd7479e6: Pull complete
eacdac7d65c9: Pull complete
66f1bd2ad7cf: Pull complete
ee6444380c18: Pull complete
1500f6dd9b69: Pull complete
0d6c64800cfc: Pull complete
Creating test_appserver_1 ... done
Killing test_appserver_1 ... done
Starting test_appserver_1 ... done
Changed current directory to /var/www/.composer
    1/10:	http://repo.packagist.org/p/provider-2014$cf2a2a2b305b0c4ba5d09ebaaa54f14c80c9d84543e7e44b72c196a3d5906fc1.json
    3/10:	http://repo.packagist.org/p/provider-2018-04$4b9e386cb5bbe5bfab43f5a4602df26da9f94814b6e23b722ec2a68e2b30da9a.json
    3/10:	http://repo.packagist.org/p/provider-2018$770f31a829d9a91c944afa87425603e02677c2b7a7a15b060b5f8aa7ce55f66c.json
    4/10:	http://repo.packagist.org/p/provider-latest$667a3d66a5ee6a2f02a764ebc82a34b594d6ae5bd502095c1c3ff37707b8910e.json
    5/10:	http://repo.packagist.org/p/provider-2015$ef8f9bb64b54ac2420c202abf6d302f9b49d940992ca912bc64b3f49f9ff1392.json
    6/10:	http://repo.packagist.org/p/provider-2016$cb70bc68454b14f4f1aa9d7fa23dc1dfed5adf44da24602258b6c1001b38493d.json
    7/10:	http://repo.packagist.org/p/provider-2018-07$22efc6409a92e7c1f2a7560aab2412ba3e5baac4f5d6b4a37da2b7efe611aa1b.json
    8/10:	http://repo.packagist.org/p/provider-2017$e4af4e0901e9d27272f6647a8783810b2b8540ece6a223d0124601619e37469a.json
    9/10:	http://repo.packagist.org/p/provider-2019-01$5fbd511838650be9a556e64dfe43e32b9ae21b351c65ddb6898b4206b9b3462c.json
    10/10:	http://repo.packagist.org/p/provider-2018-10$3530a5a7dbd892170369400b231e80284885e40b7a2e3a3db16214ba27d7cf8f.json
    Finished: success: 10, skipped: 0, failure: 0, total: 10
Using version ^9.6 for drush/drush
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
    1/39:	https://codeload.github.com/consolidation/self-update/legacy.zip/a1c273b14ce334789825a09d06d4c87c0a02ad54
    2/39:	https://codeload.github.com/composer/semver/legacy.zip/46d9139568ccb8d9e7cdd4539cab7347568a5e2e
    3/39:	https://codeload.github.com/consolidation/log/legacy.zip/b2e887325ee90abc96b0a8b7b474cd9e7c896e3a
    4/39:	https://codeload.github.com/consolidation/filter-via-dot-access-data/legacy.zip/a53e96c6b9f7f042f5e085bf911f3493cea823c6
    5/39:	https://codeload.github.com/symfony/filesystem/legacy.zip/e16b9e471703b2c60b95f14d31c1239f68f11601
    6/39:	https://codeload.github.com/consolidation/output-formatters/legacy.zip/0881112642ad9059071f13f397f571035b527cb9
    7/39:	https://codeload.github.com/consolidation/site-process/legacy.zip/29d6860e65eb22c1ffaff9777a6f1ce6e7adf188
    8/39:	https://codeload.github.com/consolidation/annotated-command/legacy.zip/512a2e54c98f3af377589de76c43b24652bcb789
    9/39:	https://codeload.github.com/grasmash/yaml-expander/legacy.zip/3f0f6001ae707a24f4d9733958d77d92bf9693b1
    10/39:	https://codeload.github.com/consolidation/config/legacy.zip/cac1279bae7efb5c7fb2ca4c3ba4b8eb741a96c1
    11/39:	https://codeload.github.com/grasmash/expander/legacy.zip/95d6037344a4be1dd5f8e0b0b2571a28c397578f
    12/39:	https://codeload.github.com/dflydev/dflydev-dot-access-data/legacy.zip/3fbd874921ab2c041e899d044585a2ab9795df8a
    13/39:	https://codeload.github.com/consolidation/Robo/legacy.zip/5c6b3840a45afda1cbffbb3bb1f94dd5f9f83345
    14/39:	https://codeload.github.com/thephpleague/container/legacy.zip/43f35abd03a12977a60ffd7095efd6a7808488c0
    15/39:	https://codeload.github.com/consolidation/site-alias/legacy.zip/8cfd3b6ab6d541086fc970bf850864293b284e6f
    16/39:	https://codeload.github.com/container-interop/container-interop/legacy.zip/79cbf1341c22ec75643d841642dd5d6acd83bdb8
    17/39:	https://codeload.github.com/php-fig/container/legacy.zip/b7ce3b176482dbbc1245ebf52b181af44c2cf55f
    18/39:	https://codeload.github.com/dnoegel/php-xdg-base-dir/legacy.zip/265b8593498b997dc2d31e75b89f053b5cc9621a
    19/39:	https://codeload.github.com/JakubOnderka/PHP-Console-Highlighter/legacy.zip/9f7a229a69d52506914b4bc61bfdb199d90c5547
    20/39:	https://codeload.github.com/JakubOnderka/PHP-Console-Color/legacy.zip/d5deaecff52a0d61ccb613bb3804088da0307191
    21/39:	https://codeload.github.com/drush-ops/drush/legacy.zip/201dc8568710122432790621c41387dacacc1a3a
    22/39:	https://codeload.github.com/symfony/debug/legacy.zip/de73f48977b8eaf7ce22814d66e43a1662cc864f
    23/39:	https://codeload.github.com/php-fig/log/legacy.zip/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd
    24/39:	https://codeload.github.com/symfony/event-dispatcher/legacy.zip/ec625e2fff7f584eeb91754821807317b2e79236
    25/39:	https://codeload.github.com/Chi-teck/drupal-code-generator/legacy.zip/a43131309b56a4c1874f39a9eaa4f6cb1a9832cd
    26/39:	https://codeload.github.com/twigphp/Twig/legacy.zip/874adbd9222f928f6998732b25b01b41dff15b0c
    27/39:	https://codeload.github.com/symfony/finder/legacy.zip/267b7002c1b70ea80db0833c3afe05f0fbde580a
    28/39:	https://codeload.github.com/symfony/process/legacy.zip/009f8dda80930e89e8344a4e310b08f9ff07dd2e
    29/39:	https://codeload.github.com/symfony/console/legacy.zip/71ce77f37af0c5ffb9590e43cc4f70e426945c5e
    30/39:	https://codeload.github.com/symfony/polyfill-mbstring/legacy.zip/c79c051f5b3a46be09205c73b80b346e4153e494
    31/39:	https://codeload.github.com/nikic/PHP-Parser/legacy.zip/5221f49a608808c1e4d436df32884cbc1b821ac0
    32/39:	https://codeload.github.com/symfony/yaml/legacy.zip/57f1ce82c997f5a8701b89ef970e36bb657fd09c
    33/39:	https://codeload.github.com/webflo/drupal-finder/legacy.zip/8a7886c575d6eaa67a425dceccc84e735c0b9637
    34/39:	https://codeload.github.com/webmozart/assert/legacy.zip/83e253c8e0be5b0257b881e1827274667c5c17a9
    35/39:	https://codeload.github.com/symfony/polyfill-ctype/legacy.zip/e3d826245268269cd66f8326bd8bc066687b4a19
    36/39:	https://codeload.github.com/symfony/var-dumper/legacy.zip/9f87189ac10b42edf7fb8edc846f1937c6d157cf
    37/39:	https://codeload.github.com/symfony/polyfill-php72/legacy.zip/9050816e2ca34a8e916c3a0ae8b9c2fccf68b631
    38/39:	https://codeload.github.com/bobthecow/psysh/legacy.zip/9aaf29575bb8293206bb0420c1e1c87ff2ffa94e
    39/39:	https://codeload.github.com/webmozart/path-util/legacy.zip/d939f7edc24c9a1bb9c0dee5cb05d8e859490725
    Finished: success: 39, skipped: 0, failure: 0, total: 39
Package operations: 39 installs, 0 updates, 0 removals
  - Installing symfony/polyfill-ctype (v1.10.0): Loading from cache
  - Installing webmozart/assert (1.4.0): Loading from cache
  - Installing webmozart/path-util (2.3.0): Loading from cache
  - Installing webflo/drupal-finder (1.1.0): Loading from cache
  - Installing symfony/yaml (v3.4.23): Loading from cache
  - Installing symfony/polyfill-php72 (v1.10.0): Loading from cache
  - Installing symfony/polyfill-mbstring (v1.10.0): Loading from cache
  - Installing symfony/var-dumper (v4.2.4): Loading from cache
  - Installing symfony/process (v3.4.23): Loading from cache
  - Installing symfony/finder (v4.2.4): Loading from cache
  - Installing symfony/event-dispatcher (v3.4.23): Loading from cache
  - Installing psr/log (1.1.0): Loading from cache
  - Installing symfony/debug (v4.2.4): Loading from cache
  - Installing symfony/console (v3.4.23): Loading from cache
  - Installing nikic/php-parser (v4.2.1): Loading from cache
  - Installing jakub-onderka/php-console-color (v0.2): Loading from cache
  - Installing jakub-onderka/php-console-highlighter (v0.4): Loading from cache
  - Installing dnoegel/php-xdg-base-dir (0.1): Loading from cache
  - Installing psy/psysh (v0.9.9): Loading from cache
  - Installing psr/container (1.0.0): Loading from cache
  - Installing container-interop/container-interop (1.2.0): Loading from cache
  - Installing league/container (2.4.1): Loading from cache
  - Installing dflydev/dot-access-data (v1.1.0): Loading from cache
  - Installing grasmash/yaml-expander (1.4.0): Loading from cache
  - Installing grasmash/expander (1.0.0): Loading from cache
  - Installing consolidation/config (1.2.1): Loading from cache
  - Installing consolidation/site-alias (3.0.0): Loading from cache
  - Installing consolidation/site-process (2.0.0): Loading from cache
  - Installing symfony/filesystem (v4.2.4): Loading from cache
  - Installing consolidation/self-update (1.1.5): Loading from cache
  - Installing consolidation/output-formatters (3.4.1): Loading from cache
  - Installing consolidation/log (1.1.1): Loading from cache
  - Installing consolidation/annotated-command (2.12.0): Loading from cache
  - Installing consolidation/robo (1.4.9): Loading from cache
  - Installing consolidation/filter-via-dot-access-data (1.0.0): Loading from cache
  - Installing composer/semver (1.5.0): Loading from cache
  - Installing twig/twig (v1.38.2): Loading from cache
  - Installing chi-teck/drupal-code-generator (1.28.0): Loading from cache
  - Installing drush/drush (9.6.0): Loading from cache
symfony/event-dispatcher suggests installing symfony/dependency-injection
symfony/event-dispatcher suggests installing symfony/http-kernel
symfony/console suggests installing symfony/lock
psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)
psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.)
consolidation/robo suggests installing henrikbjorn/lurker (For monitoring filesystem changes in taskWatch)
consolidation/robo suggests installing natxet/CssMin (For minifying CSS files in taskMinify)
consolidation/robo suggests installing patchwork/jsqueeze (For minifying JS files in taskMinify)
consolidation/robo suggests installing pear/archive_tar (Allows tar archives to be created and extracted in taskPack and taskExtract, respectively.)
Writing lock file
Generating autoload files
Killing test_appserver_1 ... done
Starting test_appserver_1 ... done
Creating test_database_1  ... done
Waiting until database service is ready...
Waiting until appserver service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...
Waiting until database service is ready...

BOOMSHAKALAKA!!!

Your app has started up correctly.
Here are some vitals:

 NAME            test                               
 LOCATION        /home/tbradbury/projects/landotest 
 SERVICES        appserver, database                
 APPSERVER URLS  https://localhost:33046            
                 http://localhost:33047             
                 http://test.lndo.site              
                 https://test.lndo.site             

Tell us about the error you got

See lando start output or

$ lando drush --version
Drush Commandline Tool 9.6.0

Tell us generally about your bug

I set the drush version as described at https://docs.devwithlando.io/tutorials/drupal7.html and version 9 was installed instead of 8.

@travis-bradbury travis-bradbury added the bug label Mar 20, 2019

@pirog pirog added this to the 3.0.0-rc.15 milestone Mar 20, 2019

@travis-bradbury

This comment has been minimized.

Copy link
Contributor Author

commented Mar 21, 2019

It looks like there's a handful of work-arounds for this.

Installs 8.1.18:

name: my-lando-app
recipe: drupal7
config:
  webroot: wwwroot

Installs 8.1.18:

name: my-lando-app
recipe: drupal7
config:
  webroot: wwwroot
  drush: 8.1.18

Installs 8.2.1:

name: my-lando-app
recipe: drupal7
config:
  webroot: wwwroot
  drush: ^8

Installs 9.6.0:

name: my-lando-app
recipe: drupal7
config:
  webroot: wwwroot
  drush: 8

Installs 9.6.0:

name: my-lando-app
recipe: drupal7
config:
  webroot: wwwroot
  drush: 8.1

So it might be a documentation issue (https://docs.devwithlando.io/tutorials/drupal7.html shows drush: 8 in the Configuration section but Using Drush shows several alternatives to specify a version). However, it's surprising to see version 9 installed when drush: 8 was specified.

@fede-green

This comment has been minimized.

Copy link

commented Apr 12, 2019

I am having drush version issues too... are you using the package drush/drush from the composer.json of your project? in my case, lando ends up using drush from there in stead of using the drush version i have in my .lando.yml file.

I wonder is there a way of using the one that should be installed in my lando machine, as when that was being built i had a message like: - Installing drush/drush (9.6.2): Loading from cache .

@pirog pirog removed this from the 3.0.0-rc.16 milestone May 7, 2019

@pirog pirog self-assigned this May 8, 2019

@pirog pirog added this to the 3.0.0-rc.16 milestone May 8, 2019

@pirog

This comment has been minimized.

Copy link
Member

commented May 9, 2019

Alright @travis-bradbury i can definitely confirm this and i think its mostly a documentation issue. Specifically, drush: 8 translates to composer global require drush/drush:8 which does resolve to the latest drush 9.6. We want to document drush: ^8 which should give you the latest Drush 8.

@fede-green this is the behavior you want and the behavior drush recommends/follows. If you want to use the Lando-installed drush we recommend you DO NOT install a site-local drush via composer.

pirog added a commit that referenced this issue May 9, 2019

pirog added a commit that referenced this issue May 9, 2019

pirog added a commit that referenced this issue May 9, 2019

@pirog pirog closed this May 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.