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

blt > drupal:install failing on Pipelines build #1581

Closed gabe-connolly closed 7 years ago

gabe-connolly commented 7 years ago

This is very similar to #1459 but in this case, pipeline.settings.php is correct and does not need adjustment. When I run the site locally I have no issues, and if I locally run blt deploy to perform a build and deploy without using Pipelines, I am able to deploy without issue.

My system information:

Output of blt doctor:

+----------------------+----------------------------------------------------------------------------------+
| Property             | Value                                                                            |
+----------------------+----------------------------------------------------------------------------------+
| %paths               |                                                                                  |
|  - %root             | /var/www/market-basket/docroot                                                   |
|  - %site             | sites/default                                                                    |
|  - %modules          | modules                                                                          |
|  - %themes           | themes                                                                           |
|  - %config-sync      | /var/www/market-basket/config/default                                            |
|  - %files            | sites/default/files                                                              |
|  - %private          | /var/www/market-basket/files-private                                             |
|  - %temp             | /tmp                                                                             |
| admin-theme          | seven                                                                            |
| blt-version          | 8.8.3                                                                            |
| bootstrap            | Successful                                                                       |
| config-sync          | /var/www/market-basket/config/default                                            |
| db-driver            | mysql                                                                            |
| db-hostname          | localhost                                                                        |
| db-name              | drupal                                                                           |
| db-password          | drupal                                                                           |
| db-port              | 3306                                                                             |
| db-status            | Connected                                                                        |
| db-username          | drupal                                                                           |
| drupal-settings-file | sites/default/settings.php                                                       |
| drupal-version       | 8.3.2                                                                            |
| drush-alias-files    | /var/www/market-basket/docroot/../drush/site-aliases/aliases.drushrc.php         |
|                      | /var/www/market-basket/docroot/../drush/site-aliases/example.acsf.aliases.drushr |
|                      | c.php                                                                            |
|                      | /var/www/market-basket/docroot/../drush/site-aliases/example.local.aliases.drush |
|                      | rc.php                                                                           |
| drush-conf           | /var/www/market-basket/drush/drushrc.php                                         |
| drush-script         | /var/www/market-basket/vendor/drush/drush/drush.php                              |
| drush-temp           | /tmp                                                                             |
| drush-version        | 8.1.11                                                                           |
| files                | sites/default/files                                                              |
| install-profile      | lightning                                                                        |
| local-drushrc        | /var/www/market-basket/docroot/sites/default/local.drushrc.php                   |
| local-settings       | /var/www/market-basket/docroot/sites/default/settings/local.settings.php         |
| modules              | modules                                                                          |
| php-bin              | /usr/bin/php                                                                     |
| php-conf             | /etc/php/7.0/cli/php.ini                                                         |
| php-os               | Linux                                                                            |
| private              | /var/www/market-basket/files-private                                             |
| root                 | /var/www/market-basket/docroot                                                   |
| site                 | sites/default                                                                    |
| temp                 | /tmp                                                                             |
| theme                | marketbasket                                                                     |
| themes               | themes                                                                           |
| uri                  | default                                                                          |
| user                 |                                                                                  |
+----------------------+----------------------------------------------------------------------------------+
+--------------------------+---------------------------------------------------------------------------------+
| Check                    | Outcome                                                                         |
+--------------------------+---------------------------------------------------------------------------------+
| checkDocrootExists       | Found docroot.                                                                  |
| checkCoreExists          | Drupal core exists                                                              |
| checkSettingsFile        | BLT settings are included in settings file.                                     |
| checkLocalSettingsFile   | Found your local settings file.                                                 |
| checkLocalDrushFile      | Found your local drush settings file.                                           |
| checkUri                 | Site URI is not set                                                             |
|                          |                                                                                 |
|                          | Is $options['uri'] set correctly in                                             |
|                          | /var/www/market-basket/docroot/sites/default/local.drushrc.php?                 |
|                          |                                                                                 |
| checkFileSystem:%files   | Public files directory is writable.                                             |
| checkFileSystem:%private | Private files directory is writable.                                            |
| checkFileSystem:%temp    | Temporary files directory is writable.                                          |
| checkDbConnection        | Connected to database.                                                          |
| checkDrupalBootstrapped  | Bootstrapped Drupal via drush.                                                  |
| checkDrupalInstalled     | Drupal is installed.                                                            |
| checkCaching:page        | Drupal cache is disabled.                                                       |
| checkCaching:css         | CSS preprocessing is disabled.                                                  |
| checkCaching:js          | JS preprocessing is disabled.                                                   |
| checkNvmExists           | NVM does not exist.                                                             |
|                          |                                                                                 |
|                          | It is recommended that you use NVM to manage multiple versions of NodeJS on one |
|                          | machine.                                                                        |
|                          | Instructions for installing NVM can be found at:                                |
|                          |   https://github.com/creationix/nvm#installation                                |
| checkCiConfig            | Git remotes are set in project.yml.                                             |
| checkComposer:require    | acquia/blt is in composer.json's require object.                                |
| checkComposer:plugins    | hirak/prestissimo plugin for composer is installed.                             |
| checkBehat:exists        | Behat local settings file exists.                                               |
| checkBehat:uri           | base_url in tests/behat/local.yml does not match the site URI.                  |
|                          |   Behat base_url is set to "http://local.market-basket.com".                    |
|                          |   Drush site URI is set to default.                                             |
| checkProjectYml:keys     | project.yml has no deprecated keys.                                             |
| checkPhpDateTimezone     | PHP setting for date.timezone is correctly set                                  |
+--------------------------+---------------------------------------------------------------------------------+

When I run this command:

pipelines start

I get the following output:

blt > drupal:install:
     [echo] Installing Drupal...
You are about to DROP all tables in your 'drupal' database. Do you want to continue? (y/n): y
Starting Drupal installation. This takes a while. Consider using the        [ok]
--notify global option.
exception 'Drupal\Component\Plugin\Exception\PluginNotFoundException'    [error]
with message 'The "entity_browser_widget_context" plugin does not
exist.' in
/mnt/tmp/local.prod/source/docroot/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php:52
Stack trace:
#0
/mnt/tmp/local.prod/source/docroot/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php(25):
Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition(Array,
'entity_browser_...', true)
#1
/mnt/tmp/local.prod/source/docroot/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(16):
Drupal\Core\Plugin\DefaultPluginManager->getDefinition('entity_browser_...')
#2
/mnt/tmp/local.prod/source/docroot/core/lib/Drupal/Component/Plugin/PluginManagerBase.php(84):
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('entity_browser_...',
Array)
#3
/mnt/tmp/local.prod/source/docroot/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php(1111):
Drupal\Component\Plugin\PluginManagerBase->createInstance('entity_browser_...')
#4
/mnt/tmp/local.prod/source/docroot/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php(1316):
Drupal\views\Plugin\views\argument\ArgumentPluginBase->getPlugin('argument_defaul...')
#5
/mnt/tmp/local.prod/source/docroot/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php(47):
Drupal\views\Plugin\views\argument\ArgumentPluginBase->calculateDependencies()
#6 [internal function]:
Drupal\views\Plugin\views\display\DisplayPluginBase->calculatePluginDependencies(Object(Drupal\views\Plugin\views\argument\StringArgument),
2)
#7
/mnt/tmp/local.prod/source/docroot/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(953):
array_walk(Array, Array)
#8
/mnt/tmp/local.prod/source/docroot/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php(47):
Drupal\views\Plugin\views\display\DisplayPluginBase->calculateDependencies()
#9
/mnt/tmp/local.prod/source/docroot/core/modules/views/src/Entity/View.php(281):
Drupal\Core\Config\Entity\ConfigEntityBase->calculatePluginDependencies(Object(Drupal\entity_browser\Plugin\views\display\EntityBrowser))
#10
/mnt/tmp/local.prod/source/docroot/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php(346):
Drupal\views\Entity\View->calculateDependencies()
#11
/mnt/tmp/local.prod/source/docroot/core/modules/views/src/Entity/View.php(291):
Drupal\Core\Config\Entity\ConfigEntityBase->preSave(Object(Drupal\Core\Config\Entity\ConfigEntityStorage))
#12
/mnt/tmp/local.prod/source/docroot/core/lib/Drupal/Core/Entity/EntityStorageBase.php(434):
Drupal\views\Entity\View->preSave(Object(Drupal\Core\Config\Entity\ConfigEntityStorage))
#13
/mnt/tmp/local.prod/source/docroot/core/lib/Drupal/Core/Entity/EntityStorageBase.php(389):
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object(Drupal\views\Entity\View))
#14
/mnt/tmp/local.prod/source/docroot/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(259):
Drupal\Core\Entity\EntityStorageBase->save(Object(Drupal\views\Entity\View))
#15
/mnt/tmp/local.prod/source/docroot/core/lib/Drupal/Core/Entity/Entity.php(364):
Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object(Drupal\views\Entity\View))
#16
/mnt/tmp/local.prod/source/docroot/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php(637):
Drupal\Core\Entity\Entity->save()
#17
/mnt/tmp/local.prod/source/docroot/profiles/contrib/lightning/profiles/lightning/modules/lightning_features/lightning_media/lightning_media.install(151):
Drupal\Core\Config\Entity\ConfigEntityBase->save()
#18
/mnt/tmp/local.prod/source/docroot/profiles/contrib/lightning/profiles/lightning/modules/lightning_features/lightning_media/lightning_media.install(31):
lightning_media_update_8008()
#19 [internal function]: lightning_media_install()
#20
/mnt/tmp/local.prod/source/docroot/core/lib/Drupal/Core/Extension/ModuleHandler.php(391):
call_user_func_array('lightning_media...', Array)
#21
/mnt/tmp/local.prod/source/docroot/core/lib/Drupal/Core/Extension/ModuleInstaller.php(287):
Drupal\Core\Extension\ModuleHandler->invoke('lightning_media',
'install')
#22
/mnt/tmp/local.prod/source/docroot/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(83):
Drupal\Core\Extension\ModuleInstaller->install(Array, false)
#23
/mnt/tmp/local.prod/source/docroot/core/includes/install.core.inc(1808):
Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array,
false)
#24 [internal function]: _install_module_batch('lightning_media',
'Lightning Media', Array)
#25 /mnt/tmp/local.prod/source/docroot/core/includes/batch.inc(252):
call_user_func_array('_install_module...', Array)
#26 /mnt/tmp/local.prod/source/docroot/core/includes/form.inc(874):
_batch_process()
#27
/mnt/tmp/local.prod/source/docroot/core/includes/install.core.inc(625):
batch_process(Object(Drupal\Core\Url), Object(Drupal\Core\Url))
#28
/mnt/tmp/local.prod/source/docroot/core/includes/install.core.inc(546):
install_run_task(Array, Array)
#29
/mnt/tmp/local.prod/source/docroot/core/includes/install.core.inc(117):
install_run_tasks(Array)
#30
/mnt/tmp/local.prod/source/vendor/drush/drush/includes/drush.inc(726):
install_drupal(Object(Composer\Autoload\ClassLoader), Array)
#31
/mnt/tmp/local.prod/source/vendor/drush/drush/includes/drush.inc(711):
drush_call_user_func_array('install_drupal', Array)
#32
/mnt/tmp/local.prod/source/vendor/drush/drush/commands/core/drupal/site_install.inc(84):
drush_op('install_drupal', Object(Composer\Autoload\ClassLoader),
Array)
#33
/mnt/tmp/local.prod/source/vendor/drush/drush/commands/core/site_install.drush.inc(254):
drush_core_site_install_version('lightning', Array)
#34 [internal function]: drush_core_site_install('lightning',
'install_configu...', 'install_configu...')
#35
/mnt/tmp/local.prod/source/vendor/drush/drush/includes/command.inc(422):
call_user_func_array('drush_core_site...', Array)
#36
/mnt/tmp/local.prod/source/vendor/drush/drush/includes/command.inc(231):
_drush_invoke_hooks(Array, Array)
#37 [internal function]: drush_command('lightning',
'install_configu...', 'install_configu...')
#38
/mnt/tmp/local.prod/source/vendor/drush/drush/includes/command.inc(199):
call_user_func_array('drush_command', Array)
#39
/mnt/tmp/local.prod/source/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67):
drush_dispatch(Array)
#40
/mnt/tmp/local.prod/source/vendor/drush/drush/includes/preflight.inc(66):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#41 /mnt/tmp/local.prod/source/vendor/drush/drush/drush.php(12):
drush_main()
#42 {main}
[phingcall] /mnt/tmp/local.prod/source/./vendor/acquia/blt/phing/tasks/drupal.xml:15:10: /mnt/tmp/local.prod/source/./vendor/acquia/blt/phing/tasks/drupal.xml:32:29: Drush exited with code 1

BUILD FAILED/mnt/tmp/local.prod/source/./vendor/acquia/blt/phing/tasks/ci.xml:4:22: Execution of the target buildfile failed. Aborting.
; 2 minutes  16.70 seconds
pipelines_kill_background_processes
pstree -p $$ | grep -E -o '([0-9]+)' | grep -v "^$$\$" | sort -k2 -rn
Killing background jobs

And I expected this to happen: I expect the Drupal installation to complete so a finished build artifact is available

grasmash commented 7 years ago

This error looks like a Drupal application error rather than a BLT related error. Drupal is failing to install and import your default configuration. It is most likely due to incorrect configuration.

When I run the site locally I have no issues

What are you running locally? Can you run blt setup? That should drop your db and re-install it freshly.

gabe-connolly commented 7 years ago

Thanks for the suggestion. I had been running blt local:refresh to get the working dev site database and apply configuration changes, and that had been working fine. When I run blt setup however, I get a similar error to what I was seeing in Pipelines. I'll try and trace where that plugin error is coming from.

gabe-connolly commented 7 years ago

Still working on this, but since this seems to be a configuration issue and not a BLT issue, I am closing this ticket.