- Issue created by @sboden
- 🇧🇾Belarus pavel.bulat
Hi @sboden , I have tested it with
"name": "drupal/config_split", "version": "2.0.0-rc4", "name": "drupal/config_filter", "version": "2.4.0", "name": "drupal/config_ignore", "version": "2.4.0",
and I can confirm that all ignored configs will be exported during `drush cex`. I think it should work this way. The most important is that ignored configs won't be imported during `drush cim`. I have tested it and ignored configs weren't imported in my case.
- 🇨🇦Canada arakwar
Isn't this the base behavior we want? As per the description, the module ignores config at importation.
This is the behavior it had for a while, but now it seems broken...
- 🇨🇦Canada joseph.olstad
We've upgraded to Drupal 10 and have noticed the above reported issue also, however we cannot downgrade to config_split beta4 , it's not Drupal 10 compatible.
There was a new release of config_split 12 days ago, worth trying out.
As it worked before... before Drupal 9.5.3 in my case, is that "drush cex" would not export the config-ignored items. Now it does.
In the past config ignored items would not be exported and I would not care about them. Now I get an export of the config ignored items, so I have to check manually which fields are config ignored and which are "real changes": people may change the config ignored items but I'm not interested in their changes from a "configuration view", else I would not have config-ignored them.
Config ignore was for me: "They're config ignored, they're in the database, I don't care about them". Now I do have to care since they will be exported, and if I don't filter them out I will add config to git which I don't care about.
- 🇨🇦Canada joseph.olstad
For us using config split, the latest release is not only exporting ingored configurations, it's also importing ignored configurations!
- 🇨🇦Canada joseph.olstad
Ok, so the workaround to the new config_ignore with config_split is to delete the split configs that you want to ignore because config_ignore is no longer able to ignore split configs for some reason.
Also, lots of noise is left by ignored configs being exported. When I ignore a config it's because I want it to go away but it's exporting the ignored configs and constantly noise about it in my git status. - 🇩🇪Germany metalbote Aachen
For me the same problem occured...and it is highly critical for any workflows.
a) config_split: Added system.menu.* to split, as menus may differ between environments.
b) config_ignore: Added system.menu.* to ignore, as menus could be created by a customer roleExpected behavior:
i) On drush cex, system.menu.my_new_prod_menu.yml gets exported to config/
ii) On drush cim, system.menu.my_new_prod_menu.yml with changes should be ignored.
iii) On drush cim, as system.menu.* is ignored, new menues on the system should not be deleted if there is no corresponding yml in config/ii) & iii) do not behave as expected, and killed menus... anyway this cannot be the wanted feature set, can it?
- 🇨🇦Canada joseph.olstad
Workaround:
move the split config that you want to ignore from the splits/live splits/dev or whatever your split is called into the non-split folder, keep the config ignore in the non-split section, now your config will be ignored.Confirmed the workaround to be successful.
- 🇩🇪Germany metalbote Aachen
Our workaround is now in
config_filter/src/ConfigFilterEventSubscriber.php
L86 adding weight to the transform:/** * {@inheritdoc} */ public static function getSubscribedEvents() { // @todo Use class constants when they get added in #2991683 $events['config.transform.import'][] = ['onImportTransform','-100']; $events['config.transform.export'][] = ['onExportTransform']; return $events; }
So ignored configs will also ignored in the split folders, for now it seems to work, but still testing...
- 🇨🇭Switzerland bircher 🇨🇿
I am pretty sure this can be configured the way you want by adjusting the weight of the splits and making them stackable.
Stackable splits will split what is in the transformation storage and if config ignore removes things from it first on export then they will not be split. - 🇨🇦Canada joseph.olstad
@metalbote , thanks for this example, hopefully this leads to a patch either for config_split or config_ignore, sounds like it may be config_split that ends up needing/getting the patch?
- 🇨🇭Switzerland bircher 🇨🇿
I am pretty sure that this doesn't need any patch at all. You can configure the event subscriber priorities for config ignore 3.0 and you can configure them per split on config split. Just update to the latest releases.
But this is a 2.x issue so that will be irrelevant soon.
- Status changed to Closed: outdated
11 months ago 4:53pm 4 January 2024 - 🇨🇭Switzerland bircher 🇨🇿
This issue is being closed because Config Ignore 2.x is deprecated.
The new 3,x version has been re-written from the ground up and works in a totally different way, yet it provides the same backwards compatible functionality. All the 2.x tests pass in 3.x and the 3.x codebase is easier to maintain.
Users of 2.x are strongly encouraged to upgrade to 3.x, as there is a very simple update path.So likely this issue is no longer relevant. If you think that this issue still applies please open it again and target the new branch. All issues on the 2.x branch were closed in bulk.