hechoendrupal / drupal-console

The Drupal CLI. A tool to generate boilerplate code, interact with and debug Drupal.
http://drupalconsole.com
GNU General Public License v2.0
940 stars 559 forks source link

[ config:import ] Configuration synchronisation that both enables & configures a module fails #4235

Open BramDriesen opened 4 years ago

BramDriesen commented 4 years ago

Describe the bug I noticed something strange today with configuration synchronisation. When we deploy configuration that contains both the enabling of a (contrib/core) module & the config from it it doesn’t seem to work. The module appears to get enabled, and the configuration gets imported, but in the end the module really isn’t enabled, although the status in the modules overview screen shows it is enabled. Uninstalling & re-enabling the module & re-importing the config fixes this, but it’s strange as it happened to me twice today.

EDIT: This seems to be a multi application issue, there is a bug in Drupal, a bug in Drush and also a bug here in Drupal console.

Drupal: https://www.drupal.org/project/drupal/issues/3119373 Drush (also mentioned the issue in the Drupal issue): https://github.com/drush-ops/drush/issues/4350

So since I also tested the steps to reproduce with Drupal console instead of drush cim I can only assume that the same kind of issue is happening here in Drupal Console.

To Reproduce I encountered the issue twice today on 2 different sites for 2 different modules (jsonapi_extras / media_library), below are the 2 scenarios written out.

jsonapi_extras

media_library

Expected behavior Configuration should enable the module properly and then import the config.

Actual behavior Module is fakely enabled and the config is imported but doesn't take effect.

Workaround No

System Configuration

Q A
Drush version? 10.2
Drupal console version? 1.9.4
Drupal version? 8.8.3
PHP version 7.4 & 7.3
OS? Mac (local) & Linux (sever) & Docker (local)

Full drush status from my local

 Drupal version   : 8.8.3
 Site URI         : http://default
 DB driver        : mysql
 DB hostname      : database
 DB port          : 3306
 DB username      : drupal8
 DB name          : drupal8
 Database         : Connected
 Drupal bootstrap : Successful
 Default theme    : total_theme
 Admin theme      : seven
 PHP binary       : /usr/local/bin/php
 PHP config       :
 PHP OS           : Linux
 Drush script     : /app/vendor/drush/drush/drush
 Drush version    : 10.2.0
 Drush temp       : /tmp
 Drush configs    : /app/vendor/drush/drush/drush.yml
                    /app/drush/drush.yml
 Install profile  : standard
 Drupal root      : /app/web
 Site path        : sites/default
 Files, Public    : sites/default/files
 Files, Private   : sites/default/files/private
 Files, Temp      : /tmp

Additional information See the issue as well on DO https://www.drupal.org/project/drupal/issues/3119373

alexpott commented 4 years ago

In Drush this is occurring because the command is using the UpdateKernel which is not correct.