Bring back overview of ignored config on import UI

Created on 6 March 2024, 10 months ago
Updated 11 April 2024, 8 months ago

Hello Team,

I wanted to bring to your attention an issue we've encountered after upgrading the Config Ignore module to version 3.x.

Following the upgrade, we've noticed that the module is not displaying the config ignored section as expected. Additionally, it seems that no configurations are being ignored despite our configuration settings.

I've reviewed the documentation and configuration settings to ensure everything is set up correctly, but we're still experiencing this issue. Is there anything specific that I might be overlooking or any additional steps required for proper configuration with version 3.x?

Your assistance in resolving this matter would be greatly appreciated.

Thank you for your attention to this issue.

Best regards,
Ajay

Feature request
Status

Needs work

Version

3.0

Component

User interface

Created by

🇮🇳India Ajay Gadhavana

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @Ajay Gadhavana
  • Status changed to Postponed: needs info 10 months ago
  • 🇨🇭Switzerland bircher 🇨🇿

    Hi, could you please elaborate on what you did and what you expected? it is very difficult to understand what the issue is.

  • 🇮🇳India Ajay Gadhavana

    Initially, a Section End of Configuration was displayed on the synchronization page, which indicated ignored configurations during imports. However, after upgrading the module, this section is no longer visible, and configurations are no longer being ignored during imports.

  • 🇮🇳India sakthi_dev

    Hi @ajay-gadhavana, I hope it was removed as a part of removal of dependency of config_filter. I'm looking to get the exact issue of that.

  • 🇮🇳India sakthi_dev

    Yeah as the part of the code dependent on the config filter module, it was removed in the issue https://www.drupal.org/project/config_ignore/issues/3099674 .

  • 🇮🇳India sakthi_dev

    Hi @bircher, I think the information provided by @ajay-gadhavana is sufficient and understandable. The request is to show the diff configs which are ignored in Configuration Sync page. Updated the code without the dependency of config_filter. Please review and refer the screenshots.

  • Pipeline finished with Failed
    9 months ago
    Total: 274s
    #129283
  • Status changed to Needs review 9 months ago
  • 🇮🇳India sakthi_dev

    Changing the status to Needs Review. https://www.drupal.org/project/config_ignore/issues/3426026#comment-1550... 🐛 Issue with Config Ignore Module after Upgrade to Version 3.x Postponed: needs info

  • Status changed to Needs work 9 months ago
  • 🇨🇭Switzerland bircher 🇨🇿

    Oh ok, I see.
    You want to bring back the overview of what was actually ignored.

    The reason why it was not ported in the first place was that it was wrong in 2.x. The same way the current MR is wrong. It is correct if you only use config ignore, but it is not correct if you use other import transformations. I have not verified it, but I would assume that the code in the MR would also tell you stuff didn't change because it was ignored due to the excluded modules feature from core. And it gets even more funky with config split in the mix.

    So what I think we need to do is just log what was ignored when it was ignored and then display that information.

    Also it would be good to test this feature otherwise we risk breaking it in the future.

  • Status changed to Needs review 9 months ago
  • 🇮🇳India sakthi_dev

    Thanks @bircher. Have updated the code to list the configs on which events based on mode selection instead of listing if there is a change. Please review.

  • Pipeline finished with Failed
    9 months ago
    Total: 193s
    #130502
  • 🇮🇳India sakthi_dev

    Pipeline is fixed in https://www.drupal.org/project/config_ignore/issues/3432315 🐛 Ignoring any config entities with an empty config sync directory causes PHP error Needs review . It will be fixed once it is merged.

  • Status changed to Needs work 9 months ago
  • 🇨🇭Switzerland bircher 🇨🇿

    Ok, I don't get it.
    Now you want to just list the config in an extra verbose way? basically expanding the wildcards to the active config.
    Not only do I not really see the value of that, but it is all done reinventing the code to do so. This will most probably either be wrong already or will be wrong with some changes to the logic of how it actually ignores the config while importing.

    From #10:

    So what I think we need to do is just log what was ignored when it was ignored and then display that information.

    Also it would be good to test this feature otherwise we risk breaking it in the future.

    So in other words, add a key valve store to the service, log the config whenever it is actually ignored, in the form alter get the data and display it nicely.
    And add a test which also enables one of the core test modules which has an import transformation and assert that the changes from it are not listed.

  • 🇮🇳India sanket.addweb

    @sakthi_dev, @bircher I encountered the same issue in the UI after updating the module from config_ignore 2.4.0 to 3.2.0. After running drush cex and drush cim, it correctly ignored config ignore items, so it's working fine.

    However, on the UI, in admin/config/development/configuration, the Synchronize list still shows the config ignore items. To address this, we can add the following lines of code to Drupal\config\Form\ConfigSync.php at line 291

    if($this->configFactory->get('config_ignore.settings')){
    foreach($config_names as $key => $config_name){
    $config_ignore_items = $this->configFactory->get('config_ignore.settings')->get('ignored_config_entities');
    if (in_array($config_name, $config_ignore_items)) {
    unset($config_names[$key]);
    }
    }
    }

Production build 0.71.5 2024