Problem/Motivation

For CMI 2.0 we worked on a new API for managing config, it is even better than config_filter, at the very least for the developer experience. See the change notice #3066005

Proposed resolution

The new API for config_distro could be simply Drupal\config_distro\DistroStorageTransformEvent.
We can make use of many of the other classes that come with 8.8 but initially we can just fork them to the config_distro namespace and then later use the one from core as that will never be part of the api of config_distro.

Remaining tasks

  • Copy relevant code from what is currently in config_environment in 8.8.x
  • Create new event (for now not extending the core event, just copy it so that it also works for Drupal 8.6)
  • Create a DistroStorageManager in the image of the Drupal\Core\Config\ExportStorageManager (yes it is not lost on me that we actually only do importing and that our storage manager has more the role of Drupal\Core\Config\ImportStorageTransformer But looking at both of those classes one can see that they basically do the same thing: take the storage and dispatch an event to transform it; This is precisely what we want to do, plus if we do the storage manager we can continue to provide the config_distro.storage.distro service.)
  • Create a new config_distro_filter submodule and enable it in an update hook in config_distro.

    config_distro_filter then implements a event subscriber and does the config_filter magic with the existing config_distro plugins so everything works in a backwards compatible fashion. (see #3050529: Create 2.x branch using the new core api for inspiration)

User interface changes

None

API changes

Events instead of plugins

Data model changes

None.

Release notes snippet

New event based API inspired by CMI 2.0 replacing the config_filter plugins.

CommentFileSizeAuthor
#33 config_distro-cmi2-3080778-33.patch11.29 KBnedjo
#33 interdiff.txt1.69 KBnedjo
#31 interdiff.txt10.01 KBnedjo
#31 config_distro-cmi2-3080778-31.patch10.6 KBnedjo
#19 interdiff.3080778.15-19.txt2.38 KBAnonymous (not verified)
#19 3080778-19.patch13.87 KBAnonymous (not verified)
#15 interdiff.3080778.13-15.txt3.03 KBAnonymous (not verified)
#15 3080778-15.patch13.16 KBAnonymous (not verified)
#12 3080778-10.patch15.1 KBAnonymous (not verified)
#10 3080778-10.patch1.62 KBAnonymous (not verified)
#8 interdiff_6-8.txt3.7 KBjoegraduate
#8 3080778-8.patch13.67 KBjoegraduate
#6 3080778-2.patch13.02 KBAnonymous (not verified)
#3 3080778-1.patch24.9 KBAnonymous (not verified)

Comments

bircher created an issue. See original summary.

bircher’s picture

Issue summary: View changes
Anonymous’s picture

Status: Active » Needs work
StatusFileSize
new24.9 KB

Attached is a first attempt to backport config_distro to use the Transform API. Would be good to know if this is on the good track. If not, feel free to say so.

The submodule is named config_distro_transform instead. I think we should avoid the suffix _filter, because it makes me think about config_filter which is what is being replaced. Anyhow, naming could still be better.

bircher’s picture

Hi,
Great work! you are on a good track!

We need only one event and only one event name because we don't import and export. We transform the active storage into a virtual storage and import that. You can think of the config distro storage as "How would my active storage look like if all the distro updates had been applied.

The new sub module I am asking to be created is not meant as a test module, and the name does not have filter in it by accident.
The module description could be: BC bridge to the previous config filter plugin api.
If we just change wholesale to a new API design then all existing sites will be broken and all the modules currently integrating will stop to work. So instead of having the old api still around we move it to a new module and install it in an update hook. this way if you update everything still works and if you install it new you only get the new api. Technically the other modules then depend on config_distro_filter but that is out of our hands here.

That said, we of course need tests too. But since we don't have any I am not insisting on that here.

Here some initial review.

  1. +++ b/config_distro.services.yml
    @@ -1,9 +1,9 @@
    +  config_distro.storage.distro.manager:
    +      class: Drupal\config_distro\DistroStorageManager
    +      arguments: ['@config.storage', '@state', '@database', '@event_dispatcher']
    +      tags:
    +        - { name: event_subscriber }
    

    probably doesn't need state or be an event subscriber itself see below.

  2. +++ b/modules/config_distro_ignore/config_distro_ignore.info.yml
    @@ -1,7 +1,13 @@
    +# Information added by Drupal.org packaging script on 2018-10-09
    

    This is added by drupal.org so we don't need it in our module code

  3. +++ b/modules/config_distro_transform/config_distro_transform.info.yml
    @@ -0,0 +1,15 @@
    +# @todo: Move this test module under the config module in #2991683.
    

    Too much copy paste I guess

  4. +++ b/modules/config_distro_transform/config_distro_transform.services.yml
    @@ -0,0 +1,6 @@
    +  config_distro_transform.event_subscriber:
    +    class: Drupal\config_distro_transform\EventSubscriber
    +    arguments: ['@config.storage', '@config.storage.sync']
    +    tags:
    +      - { name: event_subscriber }
    

    This is what I meant with getting inspired by the 2.x patch for config_filter. This should have as its arguments only @config_filter.storage_factory

    You can do the thing that happens in the import transformation on the config_filter patch
    Ie the storage form the DistroStorageTransformEvent is the "active" so you get a filtered storage for the event storage, then you copy the filtered storage into a temporary one and then the temporary one back to the event storage.

  5. +++ b/modules/config_distro_transform/src/EventSubscriber.php
    @@ -0,0 +1,102 @@
    +  public static function getSubscribedEvents() {
    +    // @todo: use class constants when they get added in #2991683
    +    $events['config.transform.import'][] = ['onImportTransform'];
    +    $events['config.transform.export'][] = ['onExportTransform'];
    +    return $events;
    +  }
    

    We don't care about the core events at all, just our new event that is inspired by it. Config Distro is doing something orthogonal.

  6. +++ b/src/Controller/ConfigDistroController.php
    @@ -2,33 +2,47 @@
    -    $class->sourceStorage = $container->get('config_distro.storage.distro');
    ...
    +    $this->sourceStorage = $this->importTransformer->transform($this->syncStorage);
    

    We don't need to touch the controller in this patch at all since we keep the distro storage service.

  7. +++ b/src/Core/Config/ConfigEvents.php
    @@ -0,0 +1,79 @@
    +final class ConfigEvents {
    

    too much copy paste, we don't need this at all. We might have one that describes the new event we are adding. but then it is definitely not related to the core one.

  8. +++ b/src/Core/Config/ImportStorageTransformer.php
    @@ -0,0 +1,83 @@
    +class ImportStorageTransformer {
    

    Too much copy paste, we don't need the import transformer because our distro storage is already doing that job.

  9. +++ b/src/Core/Config/ManagedStorage.php
    @@ -0,0 +1,157 @@
    +// @todo: Move this back to \Drupal\Core\Config in #2991683.
    ...
    +class ManagedStorage implements StorageInterface {
    

    yes the managed storage we copy from core, we may want to add a different todo though

  10. +++ b/src/DistroStorageManager.php
    @@ -0,0 +1,113 @@
    +  use StorageCopyTrait;
    

    I forgot in which Drupal version we added that I think 8.7, we can copy the trait too or make the minimal version 8.7

  11. +++ b/src/DistroStorageManager.php
    @@ -0,0 +1,113 @@
    +    if ($this->state->get(self::NEEDS_REBUILD_KEY, TRUE)) {
    ...
    +      $this->state->set(self::NEEDS_REBUILD_KEY, FALSE);
    

    We don't need to do that conditionally, we dispatch the event every time the storage is needed. The managed storage only calls this once.

  12. +++ b/src/DistroStorageManager.php
    @@ -0,0 +1,113 @@
    +      $this->eventDispatcher->dispatch('config.transform.export', new DistroStorageTransformEvent($this->storage));
    

    This is the wrong event name, I would use 'config_distro.transform'
    Also make sure that the storage is either a memory storage or uses the config_distro table, we don't want to interfere with the internals of the core API.

  13. +++ b/src/DistroStorageManager.php
    @@ -0,0 +1,113 @@
    +  public static function getSubscribedEvents() {
    +    $events[ConfigEvents::SAVE][] = ['onConfigChange', 0];
    +    $events[ConfigEvents::DELETE][] = ['onConfigChange', 0];
    +    $events[ConfigEvents::RENAME][] = ['onConfigChange', 0];
    +    return $events;
    +  }
    

    No need to cache anything.

  14. +++ b/src/Event/DistroStorageTransformEvent.php
    @@ -0,0 +1,48 @@
    +// @todo: below removed when namespace is \Drupal\Core\Config in 2991683.
    

    We will always keep this event in config_distro

We don't need to change the controller here. But if you want to check out some of my experiments for the new core module check out
#3048860: Create Config Environment API comment #4
We may want to complicate things too for config distro or have some more options, like selecting which "packages of updates" to include etc. But for a fist approach I would keep it simple.

bircher’s picture

ah another small comment..
we can make the config_distro_ignore depend on config_distro_filter and not change anything in that for now.
Then updating config_distro_ignore would become a example exercise on how to update modules to use the new api in a followup.

Anonymous’s picture

StatusFileSize
new13.02 KB

Thanks for reviewing! I've tried to take your comments into account.

  1. Not 100% sure if my change is what you expect to see.
  2. done
  3. done
  4. That 2.0 patch was indeed a good inspiration! My change needs review, though.
  5. Since we don't care about the Transform API's core events, maybe we shouldn't use onImportTransform then? And rename it.
  6. done
  7. done
  8. done
  9. Aren't we using it in the same way config_environment is using it? Could you explain what to change in the @todo?
  10. Not sure what the best approach is: copy the trait or make the minimal version 8.7?
  11. done
  12. done
  13. done
  14. done
bircher’s picture

Yes looks very good!

I am just on my phone at the moment, so not an in-depth review, just some things I noticed even without dreditor.

1) I think it is much better, yes.
4) The following line is using the wrong storage name:
$filtered = $this->filterStorageFactory->getFilteredStorage($storage, ['config.storage.sync']); we want the distro storage, ie what plugins would annotate for, see the config_distro_ignore plugin.
5) yea, to make it more readable it could be onDistroTransform, that is internal code though so it would work with any name.
9) yes we use it in the same way, but in config_environment the comment is about moving it to the right location, here we remove the class altogether when 8.8 becomes the minimal version we support. (provided the class gets to 8.8)
10) I think requiring 8.7 is ok. I think also the read-only storage was added in 8.7

15) The config_distro_ignore has now its core key commented out, it should instead depend on config_distro_filter
16) We also need an update hook enabling config_distro_filter

joegraduate’s picture

Status: Needs work » Needs review
StatusFileSize
new13.67 KB
new3.7 KB

The attached patch is an attempt to incorporate the improvements outlined by @bircher in #7.

bircher’s picture

Status: Needs review » Needs work

Cool!
Thanks for the patch, there are a few dependencies that need to be sorted out though.
This is just a very quick review, manual testing on a site that this module is used would be great too.

  1. +++ b/config_distro.info.yml
    @@ -4,5 +4,6 @@ description: Framework for managing configuration updates from distributions.
    +# @todo: remove dependency on config_environment in #2991683.
    +  - drupal:config_environment
    

    We don't want to depend on config_environment.

  2. +++ b/modules/config_distro_filter/config_distro_filter.info.yml
    @@ -0,0 +1,9 @@
    +  - drupal:config
    

    But instead of depending on cores config this module depends on config_filter

  3. +++ b/modules/config_distro_filter/config_distro_filter.info.yml
    @@ -0,0 +1,9 @@
    +# @todo: remove dependency on config_environment in #2991683.
    +  - drupal:config_environment
    

    also don't depend on config_environment

  4. +++ b/modules/config_distro_ignore/config_distro_ignore.info.yml
    @@ -4,4 +4,4 @@ description: Retain custom configuration when importing the distribution configu
    -  - config_distro:config_distro
    +  - config_distro:config_distro_filter
    

    config_distro_ignore should depend on both

  5. +++ b/src/Core/Config/ManagedStorage.php
    @@ -0,0 +1,157 @@
    +// Use this class with its class alias Drupal\Core\Config\ManagedStorage
    

    we don't have or need a class alias, so this comment is not necessary

  6. +++ b/src/Core/Config/StorageManagerInterface.php
    @@ -0,0 +1,24 @@
    +// @todo: Move this back to \Drupal\Core\Config in #2991683.
    +// Use this class with its class alias Drupal\Core\Config\StorageManagerInterface
    

    This comment also need to be updated. We can remove this class when 8.8 is the minimum supported version.

Anonymous’s picture

Status: Needs work » Needs review
StatusFileSize
new1.62 KB

The attached patch is an attempt to incorporate the improvements outlined by @bircher in #9.

I've also tested on 8.8-beta1 and got the expected message:

Module config_distro cannot be enabled because it depends on the following modules which could not be found: config_environment

joegraduate’s picture

Status: Needs review » Needs work

@wouter.adem, patch #10 appears to be incomplete, i.e. it is missing most of the files added by earlier patch versions.

Anonymous’s picture

StatusFileSize
new15.1 KB

@joegraduate Thanks for the catch. That happens if you try to do several things at the same time. My apologies.

Adding the correct patch now with @bircher's comments fixed.

joegraduate’s picture

Status: Needs work » Needs review
bircher’s picture

Status: Needs review » Needs work

Some more remarks.

  1. diff --git a/3080778-12.patch b/3080778-12.patch
    new file mode 100644
    index 0000000..9df68c4
    --- /dev/null
    +++ b/3080778-12.patch
    @@ -0,0 +1,39 @@
    

    :D Of course we shouldn't add the patch file.

  2. +++ b/modules/config_distro_filter/src/ConfigDistroFilterEventSubscriber.php
    @@ -0,0 +1,60 @@
    \ No newline at end of file
    

    This new line is a super-nit-pick. We can also fix it on commit.

  3. +++ b/modules/config_distro_ignore/config_distro_ignore.install
    @@ -0,0 +1,13 @@
    +/**
    + * Installs Config Distro Filter module.
    + */
    +function config_distro_ignore_update_8101() {
    +  \Drupal::service('module_installer')->install(['config_distro_filter']);
    +}
    

    Sorry for not having noticed this earlier.
    While of course config_distro_ignore now depends on config_filter through config_distro_filter, this update hook needs to be on the config_distro module. This is the best we can do to not disrupt current installations. Since all current modules that extend config_distro do so by means of config filter plugins. So we need this update hook to run regardless of config_distro_ignore but config_distro will not depend on this new module, so site builders are free to uninstall it again.

Anonymous’s picture

Status: Needs work » Needs review
StatusFileSize
new13.16 KB
new3.03 KB

The attached patch is an attempt to incorporate the improvements outlined by @bircher in #15.

joegraduate’s picture

@bircher, a couple of questions:

  • Would it make sense to change the update hook to only enable config_distro_filter if the Drupal Core version is < 8.8.x ?
  • Does config_distro_filter's config_filter module dependency need to be more specific (require the 2.x version of config_filter)?
bircher’s picture

RE #16:
Good questions!

  • Update hook only for <8.8: No. For sure not, we need to enable config_distro_filter because before this patch all sites that used config_distro will have done so using a config filter plugin for the distro storage. This patch has no dependency on Drupal 8.8 as we borrow all the 8.8 only code and remove them only once 8.8 is the minimal supported version. (In 8.8 with this version of config_distro there will be a couple of identical classes but with different namespaces. This is on purposes as it is due to backporting it for 8.7)
  • Does it need 2.x of config_filter. No. config_filter 2.x is only for 8.8 and is a bridge for config filter plugins for the sync storage to the new core api in 8.8. The api of config_filter apart from not switching out the sync storage is unchanged in 2.x, so this will work with both 1.x and 2.x.
kingdutch’s picture

Status: Needs review » Needs work

I think we should make a change for discoverability's sake.

line 65 of DistroStorageManager.php reads $this->eventDispatcher->dispatch('config_distro.transform', new DistroStorageTransformEvent($this->storage));

Here the event name is hardcoded.

We should instead change this hardcoded string to ConfigDistroEvents::TRANSFORM and add the string to that class. This is already done for the import event and avoids typoes in the event name.

Anonymous’s picture

Status: Needs work » Needs review
StatusFileSize
new13.87 KB
new2.38 KB

Adding a fix as per the comment #18.
Removed an unused class.

joegraduate’s picture

The changes in #19 look good to me!

a.dmitriiev’s picture

Hi, I am interested in these new features. Are there any plans to apply the patch from #19 and create a new stable version soon? It is also Drupal 9 coming in 2 weeks, it would be nice to have config_distro updated till then.

Thanks!

Meanwhile I am testing the patch, will get back soon with feedback.

nedjo’s picture

@a.dmitriiev feedback on the testing the patch would be great. It's particularly of interest to see how the patch works in combination with any existing implementations using Config Distro, such as Configuration Synchronizer. You've been active recently in that module's issue queue (thanks!). Can you report on how it's working with this patch?

a.dmitriiev’s picture

Patch in #19 worked for me on Drupal 8.8.5. I did a real test run of `drush cd-update` command with 1 new field (field storage and field instance configs) and changes to form display and view display and bunch of changes in image styles configs.

Everything works as expected.

P.S. I am using config_sync module with all dependencies, including config_distro

a.dmitriiev’s picture

Status: Needs review » Reviewed & tested by the community
a.dmitriiev’s picture

Actually we are heavily using config_sync and config_distro in our projects and are very glad to have those modules in our distribution, because we control all config updates with them.

Thank you so much, all involved!

nedjo’s picture

Status: Reviewed & tested by the community » Needs work

Thanks all for the work in this issue.

Given where we are now - near the end of the 8.8.x release cycle - should we consider instead creating a 2.x branch where we don't need to bring forward compatibility for core 8.7.x? I'm thinking that doing so would mean modules that still rely on config_filter for integration with config_distro would need to upgrade to config_filter 2.x, but otherwise could be expected to keep working until they refactor to use the transformation API.

And a detail in the current patch:

+++ b/src/DistroStorageManager.php
@@ -0,0 +1,71 @@
+    $this->storage = new DatabaseStorage($connection, 'config_distro');

In the implementation we're replacing, we use a GhostStorage that wraps config.storage. Presumably we should retain that rather than introducing a new database storage. If we stick with 8.7.x compatibility, doing so would mean either (a) retaining the current dependency on config_filter or (b) forking GhostStorage (which hasn't gone into core) and ReadOnlyStorage (which has, but only as of 8.8.x).

nedjo’s picture

In the implementation we're replacing, we use a GhostStorage that wraps config.storage. Presumably we should retain that rather than introducing a new database storage.

I take that back, I hadn't looked at core's ExportStorageManager, on which DistroStorageManager is modeled and while I haven't spent enough time with that class to completely follow the logic I accept that the same considerations presumably apply here.

  1. +++ b/src/Core/Config/StorageManagerInterface.php
    @@ -0,0 +1,24 @@
    +  public function getStorage();
    

    This interface is no longer in sync with the core version, which throws an exception.

  2. +++ b/src/DistroStorageManager.php
    @@ -0,0 +1,71 @@
    +class DistroStorageManager implements StorageManagerInterface {
    

    Should be a final class as its interface has a single public method.

  3. +++ b/src/DistroStorageManager.php
    @@ -0,0 +1,71 @@
    +  public function getStorage() {
    

    This looks like it needs updating too. For parallelism with the core method presumably should attempt to get a lock and conditionally throw a StorageTransformerException.

nedjo’s picture

Given where we are now - near the end of the 8.8.x release cycle - should we consider instead creating a 2.x branch where we don't need to bring forward compatibility for core 8.7.x? I'm thinking that doing so would mean modules that still rely on config_filter for integration with config_distro would need to upgrade to config_filter 2.x, but otherwise could be expected to keep working until they refactor to use the transformation API.

The problem here is we provide a ConfigDistroFilterInterface and use the same in our own submodule, config_distro_ignore. So, yes, in the current 1.x branch we could drop core 8.7.x support and so avoid the need to fork some core code, but we can't skip straight to a version without config_filter and still maintain support for existing implementations, at least not without bringing forward some legacy config_filter integration anyway, which would pretty much defeat the purpose of a 2.x branch.

bircher’s picture

RE #26 Yes we could use a MemoryStorage instead of a database, in core it is a database because of concerns with memory usage. We can not use the GhostStorage (can see but can't interact with) because we expect event subscribers to actually modify the storage.

RE #27 Yes we should also add a lock (and in general copy paste from core and use our storage database) +1 also for the final.

RE #28 Yes given where we are now we can drop support for 8.7, sites still on 8.7 do not get the security coverage and they can keep using the previous version of the module.
And since we have config_distro_filter that we enable in a update hook we kan keep this on 1.x, this way we have the backwards compatibility (yes modules using the filter plugins would now have to depend on config_distro_filter but we do that for config_distro_ignore here and we can follow up with third party modules providing these filters to either add a dependency on config_distro_filter (easy) or switch to the new API (more code). Since probably most of these modules are maintained by one of the people active in this issue I think we are fine with this too.
config_distro_filter works with both 1.x and 2.x of config_filter so once we remove config_distro_filter we cut 2.x in my opinion.

config_distro_filter is the bridge between the current config_distro and the api after this patch the same way config_filter 2.x is the bridge between config_filter 1.x and the new core API. (that is also why config_filter 1.x and 2.x have the same API but are different versions because the behaviour is different)

NB: I would remove the classes that are tagged in the patch to be removed, but crutially keep the event ours even if it looks very similar to the core event because then we can add stuff if we want later without a problem.

nedjo’s picture

Assigned: Unassigned » nedjo

@bircher k, thx, I'll draft an updated patch.

nedjo’s picture

Assigned: nedjo » Unassigned
Status: Needs work » Needs review
StatusFileSize
new10.6 KB
new10.01 KB

Here's an untested draft of the changes outlined in #29.

Yes we could use a MemoryStorage instead of a database

Done.

Yes we should also add a lock (and in general copy paste from core and use our storage database) +1 also for the final.

Done.

I would remove the classes that are tagged in the patch to be removed, but crucially keep the event ours even if it looks very similar to the core event because then we can add stuff if we want later without a problem.

Done.

@a.dmitriiev, might you be up for retesting (fixing up any obvious errors I've introduced as needed) and reporting back?

nedjo’s picture

I did some testing with Configuration Synchronizer, not working so far. Steps and results:

  • Install a fresh site with Drupal 8.8.6 with the standard install profile.
  • Install Configuration Synchronizer and all dependencies in dev releases.
  • Patch Config Distro with the latest patch from this issue.
  • Navigate to /admin/config/development/configuration/distro. Result: "There are no configuration changes to import." This is as expected.
  • Manually edit the file /core/modules/contact/config/install/contact.settings.yml, changing the line user_default_enabled: false to read instead user_default_enabled: true. This simulates a configuration change coming with a new release.
  • Return to /admin/config/development/configuration/distro. Result: The contact settings configuration item shows as having updates. This is as expected.
  • Click on the "View differences" link for the changed configuration item. Expected result: a diff showing the one-line difference. Actual result: "Active" shows all lines deleted, "Staged" reads "File deleted".
  • Click on "Import" button. Synchronization runs and page refreshes.
  • Click on any link: fatal error. Logs include:
    Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException: The service "access_check.contact_personal" has a dependency on a non-existent service "user.data".
    .

Haven't yet tried debugging.

nedjo’s picture

StatusFileSize
new1.69 KB
new11.29 KB

Oops, forgot we'd added an update, so yeah, not running the update might break things ;)

I'll try to find time to retest. Meantime, adding in a couple more version constraints and such.

a.dmitriiev’s picture

I will do some testing today and tomorrow.

a.dmitriiev’s picture

ok, I had to clean the caches after running update, because on Configuration Import page I've got this message:

The configuration cannot be imported because it failed validation for the following reasons:
Configuration config_snapshot.snapshot.config_sync.module.config_distro_filter depends on the Config Distro Filter module that will not be installed after import.

After cleaning the caches, the message was gone and the configuration was imported properly.

nedjo’s picture

@a.dmitriiev thx for testing and reporting back.

ok, I had to clean the caches after running update, because on Configuration Import page I've got this message

On the face of it that sounds like a bug internal to Configuration Syncrhonizer and not one in Config Distro.

nedjo’s picture

Did some more testing, this is all looking good. I'll apply and cut another alpha release. That'll allow a corresponding Configuration Sychronizer release

To use in Drupal 9 with Configuration Synchronizer requires the patch from this core bug: #3152320: [backport] ExtensionInstallStorage::createCollection() produces error. Here are full steps for testing I used in Drupal 9. As soon as we have new releases for Config Distro and Configuration Synchronizer, steps 3 and 4 will no longer be needed and step 5 will use stable rather than dev releases.

  1. Install a fresh site with the latest Drupal 9 release with the standard install profile.
  2. Apply the latest patch from #3152320: [backport] ExtensionInstallStorage::createCollection() produces error.
  3. Patch Config Distro with the latest patch from this issue.
  4. Install Config Distro Filter (necessary because Configuration Synchronizer doesn't yet have that dependency--we have to post a new Config Distro release first)
  5. Install Configuration Synchronizer and all dependencies in dev releases.
  6. Navigate to /admin/config/development/configuration/distro. Result: "There are no configuration changes to import." This is as expected.
  7. Manually edit the file /core/modules/contact/config/install/contact.settings.yml, changing the line user_default_enabled: false to read instead user_default_enabled: true. This simulates a configuration change coming with a new release.
  8. Run drush config:get contact.settings user_default_enabled to confirm the initial setting of the setting we edited. Expected result: 'contact.settings:user_default_enabled': true.
  9. Return to /admin/config/development/configuration/distro. Result: The contact settings configuration item shows as having updates. This is as expected.
  10. Click on the "View differences" link for the changed configuration item. Expected result: a diff showing the one-line difference. Actual result: "Active" shows all lines deleted, "Staged" reads "File deleted". This is due to #3152304: Diff display broken, which is filed for now on Configuration Synchronizer but may be a bug here in Config Distro.
  11. Click on "Import" button. Synchronization runs and page refreshes.
  12. Run drush config:get contact.settings user_default_enabled to confirm the updated setting of the setting we edited. Expected result: 'contact.settings:user_default_enabled': false.

  • nedjo committed 542f404 on 8.x-1.x authored by wouter.adem
    Issue #3080778 by wouter.adem, nedjo, joegraduate, bircher, a.dmitriiev...
nedjo’s picture

Status: Needs review » Fixed

Committed, thx all!

nedjo’s picture

Adding missed credits.

  • nedjo committed d82bdb7 on 8.x-1.x
    Issue #3080778 by nedjo: add missed dependency of config_distro_filter...

Status: Fixed » Closed (fixed)

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