acquia / blt

Acquia's toolset for automating Drupal 8 and 9 development, testing, and deployment.
https://docs.acquia.com/blt/
GNU General Public License v2.0
442 stars 394 forks source link

Updating to blt 9.2.0 from 9.1.7 results in error #3173

Closed shelane closed 5 years ago

shelane commented 6 years ago

My system information:

Output of blt doctor:

+---------------------------+------------------------------------------------+
| Property                  | Value                                          |
+---------------------------+------------------------------------------------+
| %paths.%root              | /var/www/docroot                               |
| %paths.%site              | sites/default                                  |
| %paths.%modules           | sites/all/modules                              |
| %paths.%themes            | sites/all/themes                               |
| %paths.%config-sync       | /var/www/config/default                        |
| %paths.%files             | sites/default/files                            |
| %paths.%temp              | /tmp                                           |
| %paths.%private           | /var/www/files-private                         |
| admin-theme               | seven                                          |
| alias-searchpaths.0       | /var/www/drush/sites                           |
| blt-version               | 9.1.7                                          |
| bootstrap                 | Successful                                     |
| composer-version          | Composer version 1.6.3 2018-01-31 16:28:17     |
| config-sync               | /var/www/config/default                        |
| db-driver                 | mysql                                          |
| db-hostname               | db                                             |
| db-name                   | default                                        |
| db-password               | user                                           |
| db-port                   | 3306                                           |
| db-status                 | Connected                                      |
| db-username               | user                                           |
| drupal-settings-file      | sites/default/settings.php                     |
| drupal-version            | 8.5.7                                          |
| drush-cache-directory     | /home/docker/.drush/cache                      |
| drush-conf.0              | /var/www/vendor/drush/drush/drush.yml          |
| drush-conf.1              | /var/www/drush/drush.yml                       |
| drush-conf.2              | /var/www/docroot/sites/default/local.drush.yml |
| drush-script              | /var/www/vendor/bin/drush                      |
| drush-temp                | /tmp                                           |
| drush-version             | 9.4.0                                          |
| files                     | sites/default/files                            |
| install-profile           | lightning                                      |
| modules                   | sites/all/modules                              |
| php-bin                   | /usr/local/bin/php                             |
| php-conf.1                | false                                          |
| php-os                    | Linux                                          |
| private                   | /var/www/files-private                         |
| root                      | /var/www/docroot                               |
| site                      | sites/default                                  |
| stacks.drupal-vm.inited   | false                                          |
| stacks.dev-desktop.inited | false                                          |
| temp                      | /tmp                                           |
| theme                     | bootstrap                                      |
| themes                    | sites/all/themes                               |
| uri                       | http://blted.docksal                           |
+---------------------------+------------------------------------------------+
+--------------------------------------+--------------------------------------------------------------+
| Check                                | Problem                                                      |
+--------------------------------------+--------------------------------------------------------------+
| BehatCheck:checkLocalConfig:exists   | tests/behat/local.yml is missing!                            |
|                                      |   Run `blt tests:behat:init:config` to generate it from      |
|                                      | example.local.yml.                                           |
| ConfigCheck:checkGitConfig           | Git repositories are not defined in blt.yml.                 |
|                                      |   Add values for git.remotes to blt.yml to enabled automated |
|                                      | deployment.                                                  |
| NodeCheck:checkNodeVersionFileExists | Neither .nvmrc nor .node-version file found in repo root.    |
+--------------------------------------+--------------------------------------------------------------+
[error]  BLT Doctor discovered one or more critical issues. 

When I run this command:

composer update acquia/blt --with-all-dependencies

I get the following output:

    1/1:    http://packagist.org/p/provider-latest$2fd5081e009add0d92be8d11503fbdedd8a2a33cb351d997059464436aa9b143.json
    Finished: success: 1, skipped: 0, failure: 0, total: 1
Gathering patches for root package.
Removing package drupal/core so that it can be re-installed and re-patched.
  - Removing drupal/core (8.5.7)
Deleting docroot/core - deleted
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package drupal/core (locked at 8.5.7, required as ^8.6.0) is satisfiable by drupal/core[8.5.7] but these conflict with your requirements or minimum-stability.
  Problem 2
    - The requested package acquia/lightning (locked at 3.1.7, required as ~3.2.0) is satisfiable by acquia/lightning[3.1.7] but these conflict with your requirements or minimum-stability.
  Problem 3
    - drupal/lightning_core 2.10.0 requires drupal/core ~8.5.7 -> satisfiable by drupal/core[8.5.x-dev].
    - drupal/lightning_core 2.10.0 requires drupal/core ~8.5.7 -> satisfiable by drupal/core[8.5.x-dev].
    - drupal/lightning_core 2.10.0 requires drupal/core ~8.5.7 -> satisfiable by drupal/core[8.5.x-dev].
    - Conclusion: don't install drupal/core 8.5.x-dev
    - Installation request for drupal/lightning_core (locked at 2.10.0) -> satisfiable by drupal/lightning_core[2.10.0].

And I expected this to happen: I expected BLT to update and drupal/core to be updated to 8.6.1.

This is on a very minimal version of BLT that I use to test development of new modules against a "vanilla" Drupal site. It uses Docksal as the local dev environment and can be found on my Github repo.

wu-edward commented 6 years ago

Assuming you have not pinned Lightning and Drupal core, try updating BLT, Lightning and Core all together: composer update acquia/blt acquia/lightning drupal/core --with-all-dependencies

shelane commented 6 years ago

I ran the suggested command. It removed Drupal 8.5.7 to turn around and re-installed Drupal 8.5.7.

composer update acquia/blt acquia/lightning drupal/core --with-all-dependencies
    1/10:   http://packagist.org/p/provider-archived$79980e0526611fbad299bd32460e941abb4f2e9e9fabde199f5f4bfa939f1763.json
    2/10:   http://packagist.org/p/provider-2013$d27cd1aa6c7201cfe13c2133f98499487407365cdab2d9abbbb28fd917589eaf.json
    3/10:   http://packagist.org/p/provider-latest$f8fadd532fea91b440ea1f7943b1f3a6670e0f7c7a5327bade2b84b39db8d030.json
    4/10:   http://packagist.org/p/provider-2014$bce2a3f20b3c9f594bade7b13ca64e9109abe8cba89c17cc12b2c9f0585d128f.json
    5/10:   http://packagist.org/p/provider-2018-04$8c47614fb5d623592df90338035966dfd134195623c8e75038640f9b40781447.json
    6/10:   http://packagist.org/p/provider-2015$7226c82a7b88ca4a4edfd6d1c9e92570d4385c8a60b3d156056d6e8e1f4eacca.json
    7/10:   http://packagist.org/p/provider-2018-01$0f80b38961d77dafdfb4e722ec62b8fd6af64990b2798bcd594bf84597ca3c13.json
    8/10:   http://packagist.org/p/provider-2016$4850d0280354838ceef399475a4436359ecc4030937769b0bbc06fdf34345539.json
    9/10:   http://packagist.org/p/provider-2017$0943f4abade312ed64209c959641032bfe5d0aaeec0e23668c07340e728f51ae.json
    10/10:  http://packagist.org/p/provider-2018-07$1efeb21fbbe967c500b9f4d74d96fb0406238dba0fb5d4701977ced8b15be9fd.json
    Finished: success: 10, skipped: 0, failure: 0, total: 10
Gathering patches for root package.
Removing package drupal/core so that it can be re-installed and re-patched.
  - Removing drupal/core (8.5.7)
Deleting docroot/core - deleted
Loading composer repositories with package information
Updating dependencies (including require-dev)
    1/27:   https://codeload.github.com/egulias/EmailValidator/legacy.zip/758a77525bdaabd6c0f5669176bd4361cb2dda9e
    2/27:   https://ftp.drupal.org/files/projects/openapi_ui_redoc-8.x-1.0-rc2.zip
    3/27:   https://codeload.github.com/symfony/class-loader/legacy.zip/f31333bdff54c7595f834d510a6d2325573ddb36
    4/27:   https://ftp.drupal.org/files/projects/schemata-8.x-1.0-alpha5.zip
    5/27:   https://codeload.github.com/symfony/serializer/legacy.zip/8bc00ef47a428bfebc4641f29d158e7c56137fcb
    6/27:   https://ftp.drupal.org/files/projects/token-8.x-1.5.zip
    7/27:   https://codeload.github.com/symfony/routing/legacy.zip/585f6e2d740393d546978769dd56e496a6233e0b
    8/27:   https://codeload.github.com/symfony/http-foundation/legacy.zip/3a4498236ade473c52b92d509303e5fd1b211ab1
    9/27:   https://codeload.github.com/symfony/http-kernel/legacy.zip/a0944a9a1d8845da724236cde9a310964acadb1c
    10/27:  https://codeload.github.com/consolidation/annotated-command/legacy.zip/4bdbb8fa149e1cc1511bd77b0bc4729fd66bccac
    11/27:  https://codeload.github.com/consolidation/site-alias/legacy.zip/247f3e52604b9d76a075e6c06d5d1dd73bbae892
    12/27:  https://codeload.github.com/symfony/finder/legacy.zip/54ba444dddc5bd5708a34bd095ea67c6eb54644d
    13/27:  https://codeload.github.com/symfony/var-dumper/legacy.zip/60319b45653580b0cdacca499344577d87732f16
    14/27:  https://codeload.github.com/acquia/blt/legacy.zip/19c7a582e2c23737dbc7840e10d6d0ca62fab78c
    15/27:  https://codeload.github.com/symfony/config/legacy.zip/e5389132dc6320682de3643091121c048ff796b3
    16/27:  https://codeload.github.com/symfony/validator/legacy.zip/9f8dbf0dceb03815c3160a279bf8cf4f8018a1c5
    17/27:  https://codeload.github.com/JakubOnderka/PHP-Console-Color/legacy.zip/d5deaecff52a0d61ccb613bb3804088da0307191
    18/27:  https://codeload.github.com/symfony/process/legacy.zip/1dc2977afa7d70f90f3fefbcd84152813558910e
    19/27:  https://codeload.github.com/symfony/filesystem/legacy.zip/d69930fc337d767607267d57c20a7403d0a822a4
    20/27:  https://codeload.github.com/symfony/translation/legacy.zip/94bc3a79008e6640defedf5e14eb3b4f20048352
    21/27:  https://codeload.github.com/symfony/debug/legacy.zip/0a612e9dfbd2ccce03eb174365f31ecdca930ff6
    22/27:  https://codeload.github.com/symfony/console/legacy.zip/3b2b415d4c48fbefca7dc742aa0a0171bfae4e0b
    23/27:  https://codeload.github.com/symfony/yaml/legacy.zip/640b6c27fed4066d64b64d5903a86043f4a4de7f
    24/27:  https://codeload.github.com/symfony/twig-bridge/legacy.zip/8a852d57a609982043a50987adfcdd3e8ccc76f9
    25/27:  https://codeload.github.com/swagger-api/swagger-ui/legacy.zip/94b1355700599ace6f0e96f3e07c94592a0e34e0
    26/27:  https://codeload.github.com/Chi-teck/drupal-code-generator/legacy.zip/a839bc89d385087d8a7a96a9c1c4bd470ffb627e
    27/27:  https://codeload.github.com/symfony/dependency-injection/legacy.zip/aea20fef4e92396928b5db175788b90234c0270d
    Finished: success: 27, skipped: 0, failure: 0, total: 27
Package operations: 1 install, 29 updates, 0 removals
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
  - Updating symfony/yaml (v3.4.15 => v3.4.17): Loading from cache
  - Updating symfony/twig-bridge (v3.4.15 => v3.4.17): Loading from cache
  - Updating symfony/debug (v3.4.15 => v3.4.17): Loading from cache
  - Updating symfony/console (v3.4.15 => v3.4.17): Loading from cache
  - Updating acquia/blt (9.1.7 => 9.2.0): Loading from cache
  - Updating symfony/filesystem (v3.4.15 => v3.4.17): Loading from cache
  - Updating symfony/config (v3.4.15 => v3.4.17): Loading from cache
  - Updating symfony/event-dispatcher (v3.4.15 => v3.4.17): Loading from cache
  - Updating symfony/var-dumper (v4.1.4 => v4.1.6): Loading from cache
  - Updating symfony/process (v3.4.15 => v3.4.17): Loading from cache
  - Updating symfony/finder (v3.4.15 => v3.4.17): Loading from cache
  - Updating jakub-onderka/php-console-color (0.1 => v0.2): Loading from cache
  - Updating consolidation/site-alias (1.1.2 => 1.1.5): Loading from cache
  - Updating symfony/dependency-injection (v3.4.15 => v3.4.17): Loading from cache
  - Updating consolidation/annotated-command (2.8.5 => 2.9.1): Loading from cache
  - Updating chi-teck/drupal-code-generator (1.26.1 => 1.27.0): Loading from cache
  - Updating symfony/translation (v3.4.15 => v3.4.17): Loading from cache
  - Updating symfony/validator (v3.4.15 => v3.4.17): Loading from cache
  - Updating symfony/serializer (v3.4.15 => v3.4.17): Loading from cache
  - Updating symfony/routing (v3.4.15 => v3.4.17): Loading from cache
  - Updating symfony/http-foundation (v3.4.15 => v3.4.17): Loading from cache
  - Updating symfony/http-kernel (v3.4.15 => v3.4.17): Loading from cache
  - Updating symfony/class-loader (v3.4.15 => v3.4.17): Loading from cache
  - Updating egulias/email-validator (1.2.14 => 1.2.15): Loading from cache
  - Installing drupal/core (8.5.7): Loading from cache
  - Applying patches for drupal/core
    https://www.drupal.org/files/issues/2752961-130.patch (Clear Twig caches on deploys)
    https://www.drupal.org/files/issues/1356278-408--8.5.x-real.patch (1356276 - Allow profiles to provide a base/parent profile and load them in the correct order)
    https://www.drupal.org/files/issues/2880374-remove-experimental-warnings-6.patch (2880374 - Experimental modules should not have warnings after being installed)
    https://www.drupal.org/files/issues/2869592-remove-update-warning-7.patch (2869592 - Disabled update module shouldn't produce a status report warning)
    https://www.drupal.org/files/issues/2885441-2.patch (2885441 - EntityReferenceAutocompleteWidget should define its size setting as an integer)
    https://www.drupal.org/files/issues/2018-06-07/2815221-102.patch (2815221 - Add quickedit to the latest-revision route)
    https://www.drupal.org/files/issues/2877383-56.patch (2877383 - Add action support to Media module)
    https://www.drupal.org/files/issues/2670730-81-89-8.5.0-rc1.patch (2670730 - Provide a delete action for each content entity type)
    https://www.drupal.org/files/issues/2018-08-22/off-canvas-2945571-19.patch (2945571 - Off canvas looks funky when using Seven theme)

  - Updating drupal/openapi_ui_redoc (1.0.0-rc1 => 1.0.0-rc2): Loading from cache
  - Updating drupal/token (1.4.0 => 1.5.0): Loading from cache
  - Updating drupal/schemata (1.0.0-alpha3 => 1.0.0-alpha5): Loading from cache
  - Updating swagger-api/swagger-ui (v3.19.0 => v3.19.3): Loading from cache
Writing lock file
Generating autoload files
Copying /var/www/vendor/acquia/blt/composer.required.json to /var/www/blt/composer.required.json. Do not modify this file. To override BLT dependencies, see readme/dependency-management.md.
Copying /var/www/vendor/acquia/blt/composer.suggested.json to /var/www/blt/composer.suggested.json. Do not modify this file. To override BLT dependencies, see readme/dependency-management.md.
Updating BLT templated files...
 > blt blt:update --ansi -y
Copying files from BLT's template into your project...
Merging BLT's blt.yml template with your project's blt/blt.yml...
Removing deprecated files and directories...
> blt:init:shell-alias
BLT can automatically create a Bash alias to make it easier to run BLT tasks.
This alias will be created in /home/docker/.bashrc.
Installing blt alias...
Added alias for blt to /home/docker/.bashrc.
You may now use the blt command from anywhere within a BLT-generated repository.
Restart your terminal session or run source /home/docker/.bashrc to use the new command.
  - Downloading 1/16: https://cgit.drupalcode.org/drupal/plain/web.config
  - Downloading 2/16: https://cgit.drupalcode.org/drupal/plain/update.php
  - Downloading 3/16: https://cgit.drupalcode.org/drupal/plain/sites/example.sites.php
  - Downloading 4/16: https://cgit.drupalcode.org/drupal/plain/sites/development.services.yml
  - Downloading 5/16: https://cgit.drupalcode.org/drupal/plain/sites/default/default.services.yml
  - Downloading 6/16: https://cgit.drupalcode.org/drupal/plain/robots.txt
  - Downloading 7/16: https://cgit.drupalcode.org/drupal/plain/index.php
  - Downloading 8/16: https://cgit.drupalcode.org/drupal/plain/.htaccess
  - Downloading 9/16: https://cgit.drupalcode.org/drupal/plain/sites/example.settings.local.php
  - Downloading 10/16: https://cgit.drupalcode.org/drupal/plain/.ht.router.php
  - Downloading 11/16: https://cgit.drupalcode.org/drupal/plain/.gitattributes
  - Downloading 12/16: https://cgit.drupalcode.org/drupal/plain/.eslintrc.json
  - Downloading 13/16: https://cgit.drupalcode.org/drupal/plain/sites/default/default.settings.php
  - Downloading 14/16: https://cgit.drupalcode.org/drupal/plain/.editorconfig
  - Downloading 15/16: https://cgit.drupalcode.org/drupal/plain/.eslintignore
  - Downloading 16/16: https://cgit.drupalcode.org/drupal/plain/.csslintrc
You are using Drupal packages that are not supported by the Drupal Security Team!
  - drupal/openapi_ui_redoc:1.0.0.0-RC2: Project has not opted into security advisory coverage!
  - drupal/schemata:1.0.0.0-alpha5: Alpha releases are not covered by Drupal security advisories.
  - drupal/schemata_json_schema:1.0.0.0-alpha5: Alpha releases are not covered by Drupal security advisories.
See https://www.drupal.org/security-advisory-policy for more information.

Running it a second time (after blt has merged all of its stuff) results in these errors:

  Problem 1
    - The requested package drupal/core (locked at 8.5.7, required as ^8.6.0) is satisfiable by drupal/core[8.5.7] but these conflict with your requirements or minimum-stability.
  Problem 2
    - drupal/lightning_core 2.10.0 requires drupal/core ~8.5.7 -> satisfiable by drupal/core[8.5.x-dev].
    - drupal/lightning_core 2.10.0 requires drupal/core ~8.5.7 -> satisfiable by drupal/core[8.5.x-dev].
    - drupal/lightning_core 2.10.0 requires drupal/core ~8.5.7 -> satisfiable by drupal/core[8.5.x-dev].
    - Conclusion: don't install drupal/core 8.5.x-dev
    - Installation request for drupal/lightning_core (locked at 2.10.0) -> satisfiable by drupal/lightning_core[2.10.0].

I don't know what is locking lightning core down and then it is locking drupal core.

ba66e77 commented 5 years ago

Running composer why-not drupal/core:8.6.1 should help unravel the requirement tree somewhat.

When I updated my own site, I used a slightly different appraoch.

$ composer require --no-update acquia/blt:9.2.0
$ composer update --with-all-dependencies acquia/blt
shelane commented 5 years ago

Running composer why-not drupal/core:8.6.1 tells me:

[InvalidArgumentException]                            
  Could not find package "drupal/core" in your project  

Clearly I have Drupal as part of BLT. Running the other two commands, I end up with the same errors that I posted before.

mikemadison13 commented 5 years ago

@shelane FYI i've had issues similar to this before, and doing a rm -rf vendor and then re-running the composer update acquia/blt --with-all-dependencies has helped. sometimes i've hit issues with dependencies getting locked and then they refresh with the removal of the vendor folder.

shelane commented 5 years ago

Yeah, I've tried removing the vendor directory and the composer.lock file. Update: my "pure" blt project is updated, but my work D8 project isn't happy. I'm dealing with this issue. That was after I believe I got the composer and install issues worked out. So I can't run the drush commands updatedb, update:lightning, or reexport config post update.

mikemadison13 commented 5 years ago

in this situation i usually revert back to a stable composer situation, re-run composer install. then i would check to make sure your composer.json doesn't have any references to lightning or drupal core in it. also make sure that acquia/blt is something along the lines of acquia/blt: ^9.2.0.

that should then let you safely composer update acquia/blt --with-all-dependencies to 9.2.x blt. if it doesn't, i sometimes find that doing a composer update acquia/lightning --with-all-dependencies FIRST will then let me update blt / drupal core.

also, we added webflo as a new thing in blt 9.2.x, so to update core itself you may need to do composer update webflo/drupal-core-require-dev --with-all-dependencies

shelane commented 5 years ago

We were able to get it upgraded finally, but I couldn’t tell you what fixed it for us. I’m going to go ahead and close this.