Problem/Motivation

I had an error during a deploy after update to version 2.1
Below you can see the logs

[37;46;1m[notice][39;49;22m Synchronized configuration: update core.extension.
[37;46;1m[notice][39;49;22m Synchronized configuration: update lightning_core.versions.
[37;46;1m[notice][39;49;22m Synchronized configuration: update config_split.config_split.dev.
[37;46;1m[notice][39;49;22m Synchronized configuration: update config_split.config_split.local.
[37;46;1m[notice][39;49;22m Synchronized configuration: update dropzonejs.settings.
[37;46;1m[notice][39;49;22m Finalizing configuration synchronization.
[37;42;1m[success][39;49;22m The configuration was imported successfully.
[37;46;1m[notice][39;49;22m There are no changes to import.
[37;42;1m[success][39;49;22m Cache rebuild complete.
[30;43;1m[warning][39;49;22m unlink(../config/envs/dev/shield.settings.yml): Permission denied FileSystem.php:124
[37;41;1m[error][39;49;22m [37;41;1m The file permissions could not be set on ../config/envs/dev. [39;49;22m

[33mIn FileStorage.php line 86:[39m
[37;41m [39;49m
[37;41m [Drupal\Core\Config\StorageException] [39;49m
[37;41m Failed to create config directory ../config/envs/dev [39;49m
[37;41m [39;49m

[33mException trace:[39m
at [32m/mnt/www/html/lifefitgroup01dev/docroot/core/lib/Drupal/Core/Config/FileStorage.php:86[39m
Drupal\Core\Config\FileStorage->ensureStorage() at [32m/mnt/www/html/lifefitgroup01dev/docroot/core/lib/Drupal/Core/Config/FileStorage.php:153[39m
Drupal\Core\Config\FileStorage->write() at [32m/mnt/www/html/lifefitgroup01dev/docroot/modules/contrib/config_split/src/Plugin/ConfigFilter/SplitFilter.php:195[39m
Drupal\config_split\Plugin\ConfigFilter\SplitFilter->filterWrite() at [32m/mnt/www/html/lifefitgroup01dev/docroot/modules/contrib/config_filter/src/Config/FilteredStorage.php:97[39m
Drupal\config_filter\Config\FilteredStorage->write() at [32m/mnt/www/html/lifefitgroup01dev/docroot/core/lib/Drupal/Core/Config/StorageCopyTrait.php:35[39m
Drupal\config_filter\ConfigFilterEventSubscriber::replaceStorageContents() at [32m/mnt/www/html/lifefitgroup01dev/docroot/modules/contrib/config_filter/src/ConfigFilterEventSubscriber.php:78[39m
Drupal\config_filter\ConfigFilterEventSubscriber->onExportTransform() at [32mn/a:n/a[39m
call_user_func() at [32m/mnt/www/html/lifefitgroup01dev/docroot/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php:111[39m
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() at [32m/mnt/www/html/lifefitgroup01dev/docroot/core/lib/Drupal/Core/Config/ExportStorageManager.php:88[39m
Drupal\Core\Config\ExportStorageManager->getStorage() at [32m/mnt/www/html/lifefitgroup01dev/docroot/core/lib/Drupal/Core/Config/ManagedStorage.php:146[39m
Drupal\Core\Config\ManagedStorage->getStorage() at [32m/mnt/www/html/lifefitgroup01dev/docroot/core/lib/Drupal/Core/Config/ManagedStorage.php:127[39m
Drupal\Core\Config\ManagedStorage->getAllCollectionNames() at [32m/mnt/www/html/lifefitgroup01dev/docroot/core/lib/Drupal/Core/Config/CachedStorage.php:247[39m
Drupal\Core\Config\CachedStorage->getAllCollectionNames() at [32m/mnt/www/html/lifefitgroup01dev/docroot/core/lib/Drupal/Core/Config/StorageComparer.php:453[39m
Drupal\Core\Config\StorageComparer->getAllCollectionNames() at [32m/mnt/www/html/lifefitgroup01dev/docroot/core/lib/Drupal/Core/Config/StorageComparer.php:198[39m
Drupal\Core\Config\StorageComparer->createChangelist() at [32m/mnt/www/html/lifefitgroup01dev/vendor/drush/drush/src/Drupal/Commands/config/ConfigCommands.php:378[39m
Drush\Drupal\Commands\config\ConfigCommands->getChanges() at [32m/mnt/www/html/lifefitgroup01dev/vendor/drush/drush/src/Drupal/Commands/config/ConfigCommands.php:281[39m
Drush\Drupal\Commands\config\ConfigCommands->status() at [32mn/a:n/a[39m
call_user_func_array() at [32m/mnt/www/html/lifefitgroup01dev/vendor/consolidation/annotated-command/src/CommandProcessor.php:257[39m
Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback() at [32m/mnt/www/html/lifefitgroup01dev/vendor/consolidation/annotated-command/src/CommandProcessor.php:212[39m
Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter() at [32m/mnt/www/html/lifefitgroup01dev/vendor/consolidation/annotated-command/src/CommandProcessor.php:178[39m
Consolidation\AnnotatedCommand\CommandProcessor->process() at [32m/mnt/www/html/lifefitgroup01dev/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:302[39m
Consolidation\AnnotatedCommand\AnnotatedCommand->execute() at [32m/mnt/www/html/lifefitgroup01dev/vendor/symfony/console/Command/Command.php:255[39m
Symfony\Component\Console\Command\Command->run() at [32m/mnt/www/html/lifefitgroup01dev/vendor/symfony/console/Application.php:1005[39m
Symfony\Component\Console\Application->doRunCommand() at [32m/mnt/www/html/lifefitgroup01dev/vendor/symfony/console/Application.php:255[39m
Symfony\Component\Console\Application->doRun() at [32m/mnt/www/html/lifefitgroup01dev/vendor/symfony/console/Application.php:148[39m
Symfony\Component\Console\Application->run() at [32m/mnt/www/html/lifefitgroup01dev/vendor/drush/drush/src/Runtime/Runtime.php:118[39m
Drush\Runtime\Runtime->doRun() at [32m/mnt/www/html/lifefitgroup01dev/vendor/drush/drush/src/Runtime/Runtime.php:49[39m
Drush\Runtime\Runtime->run() at [32m/mnt/www/html/lifefitgroup01dev/vendor/drush/drush/drush.php:72[39m
require() at [32m/mnt/www/html/lifefitgroup01dev/vendor/drush/drush/drush:4[39m

As far as I could understand the version 2.1 is trying to unlink and recreate a folder inside the config folder, as we don't have permission to change that on the production server, is throwing an error.

Steps to reproduce

Install or upgrade from version 1.6 to 2.1 and deploy to Acquia Cloud Site Facotry.

Proposed resolution

My faster solution was rollback to version 1.6, I will spend some time later to see what are the differences between the version I try to propose a new solution.

Comments

aluzzardi created an issue. See original summary.

hershey.k’s picture

We are experiencing the same error on Acquia Cloud Enterprise. This https://support.acquia.com/hc/en-us/articles/360049817594-Configuration-... issue may be related.

hershey.k’s picture

Title: Error during Acquia Cloud Site Factory Deployment » Error during Acquia Cloud Deployment
bircher’s picture

Project: Config Filter » Configuration Split
Version: 8.x-2.1 » 8.x-1.x-dev

Ahhh! of course drush does an export to make the diff...
Hmm it is not worth the trouble then, lets make COnfig split 1.x only work with config filter 1.x ...

brayfe’s picture

I'm having the same issues after updating config_split from 1.4 -> 1.5, when deploying to Acquia Cloud.

[Acquia\Blt\Robo\Tasks\DrushTask] Running /var/www/html/opensourcepem.test/vendor/bin/drush @self config-status --no-interaction -v in /var/www/html/opensourcepem.test/docroot
 [warning] unlink(../config/envs/stage/acquia_connector.settings.yml): Permission denied FileSystem.php:124
 [warning] unlink(../config/envs/stage/filter.format.rich_text.yml): Permission denied FileSystem.php:124
 [warning] unlink(../config/envs/stage/search_api.server.acquia_search_server.yml): Permission denied FileSystem.php:124
 [warning] unlink(../config/envs/stage/system.performance.yml): Permission denied FileSystem.php:124
 [warning] unlink(../config/envs/stage/acquia_connector.settings.yml): Permission denied FileSystem.php:124
 [warning] unlink(../config/envs/stage/filter.format.rich_text.yml): Permission denied FileSystem.php:124
 [warning] unlink(../config/envs/stage/search_api.server.acquia_search_server.yml): Permission denied FileSystem.php:124
 [warning] unlink(../config/envs/stage/system.performance.yml): Permission denied FileSystem.php:124
 [error]  The file permissions could not be set on ../config/envs/stage. 

In FileStorage.php line 86:
                                                          
  [Drupal\Core\Config\StorageException]                   
  Failed to create config directory ../config/envs/stage 

I can paste the stacktrace if that's helpful, but it's a jumbled mess. The deployment is successful, in terms of code, database, config, etc, but the Acquia Cloud dashboard shows a failure. I didn't think it was worth downgrading, yet, but would love to understand what has changed.

danepowell’s picture

As bircher alluded to, I think the solution here is to only use Config Filter 1.x with Config Split 1.x.

For Config Split, this means adding a version constraint to only use Config Filter 1.x

For end users, an immediate workaround is to just constrain Config Filter yourself: composer require drupal/config_filter:^1.0

brayfe’s picture

Okay, can confirm. rolling Config Filter back to ^1.0 (version 1.6) allowed the Acquia deployment to succeed without errors.

  • bircher committed aece2b6 on 8.x-1.x
    Issue #3172440 by bircher: Use config filter 1.x since drush config:...
bircher’s picture

Title: Error during Acquia Cloud Deployment » Splits are updated also when previewing, this makes it incompatible with config filter 2.x
Priority: Major » Critical
Status: Active » Fixed

Ok I tagged a new release for this.
Thanks for reporting and thanks for the helpful insights.

bircher’s picture

So the problem is actually that drush does a export preview in config:status

With this: it does a import preview, and then Config Splt 1.x can be used with Config Filter 2.x again.
https://github.com/drush-ops/drush/pull/4554

guillaumeduveau’s picture

Hi,

So will config_split 1.x still require config_filter 1.x forever, or can we expect a config_split 1.7 or whatever that works with config_filter 2.x ?

I think I just updated a few weeks ago from config_filter 1.x to 2.x to be able to update to config_split 1.5. Wouldn't want to go back to config_filter 1.x again then config_filter 2.x again ;)

hershey.k’s picture

@bircher I can confirm that with the `drush/drush` patch applied the original issue outlined by the OP is addressed with `config_filter: 2.x`.

@GuillaumeDuveau - by applying this patch (https://github.com/drush-ops/drush/pull/4554) you should be able to successfully use `config_split: 1.5.0` with `config_filter: 2.x`. You wouldn't upgrade to the release of `config_split: 1.6.x` as that would prevent you from using `config_filter: 2.x`.

bircher’s picture

The drush PR will likely go into the next drush release (fingers crossed) so then if someone wants to use config_filter 2.x again we can allow it again.

I am currently working on Config Split 2.x which will not depend on config filter and which will not have this problem.

So after drush is fixed and someone opens an issue to allow 2.x again we can add it again.

But Config Split will 1.x will always have this limitation of having this side effect when exporting, at least with drupal console and drush 8, for drush 9 and 10 we could do some tricks and buffer the split but given that in 2.x this problem will be solved already I am not sure anyone is going to spend a lot of time on it.

bircher’s picture

Also it is worth adding that the only difference functionally is that 2.x (of both config split and filter) will not show differences of config in the split when previewing the export config and insted show only the difference of what goes in the sync directory

sker101’s picture

Hi, I also confirmed that the Drush patch works for the `drush status` command on Acquia environments.
However, I'm still getting same errors when I try to run `drush cex --diff`.
I guess this would still be a blocker for allowing config filter to be updated to 2.x

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.