Expose validation constraint violations in Config Inspector UI and drush command

Created on 10 May 2023, over 1 year ago
Updated 19 May 2023, over 1 year ago

Problem/Motivation

Sibling issue of ✨ Expose validation constraints (and validatability %) in Config Inspector UI Fixed .

I'd love to see validation errors show up in:

  1. β†’
  2. β†’ see sample output in #9

β€” see 🌱 [META] Untie config validation from form validation β€” enables validatable Recipes, decoupled admin UIs … Active πŸ€“

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Fixed

Version

2.1

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

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

Comments & Activities

  • Issue created by @wim leers
  • Status changed to Needs review over 1 year ago
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update over 1 year ago
    2 pass, 2 fail
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Next up: drush config:inspect --detail.

  • The last submitted patch, 2: 3359418-2.patch, failed testing. View results β†’
    - codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

  • πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

    Great, thanks for working on this! Fails with this though. The invocation of the method is added in the patch but the method is not :)

    Call to undefined method Drupal\config_inspector\ConfigInspectorManager::violationsToArray()
    Drupal\config_inspector\Controller\ConfigInspectorController->formatList()() (Line: 334)

  • Status changed to Needs work over 1 year ago
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Yep, on it! πŸ€“πŸ˜…πŸ™ˆ

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update over 1 year ago
    3 pass
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Still need to add drush command support.

  • πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

    Looks good so far IMHO :)

  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update over 1 year ago
    3 pass
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Ready for review!

    Updated drush capabilities demonstrated:

    1. $ vendor/bin/drush config:inspect
       ----------------------------------------------------------- ---------- ---------- 
        Key                                                         Status     Data      
       ----------------------------------------------------------- ---------- ---------- 
        automated_cron.settings                                     Correct    Valid     
        automatic_updates.settings                                  Correct    Valid     
        block.block.claro_breadcrumbs                               Correct    Valid     
        block.block.claro_content                                   Correct    Valid     
        block.block.claro_help                                      Correct    Valid     
        block.block.claro_local_actions                             Correct    Valid     
      …
        tour.tour.block-layout                                      Correct    Valid     
        tour.tour.cdn-ui                                            8 errors             
        tour.tour.views-ui                                          Correct    Valid     
        update.settings                                             Correct    1 errors  
        user.flood                                                  Correct    Valid     
      …   
        views.view.watchdog                                         Correct    Valid     
        views.view.who_s_new                                        Correct    Valid     
        views.view.who_s_online                                     Correct    Valid     
       ----------------------------------------------------------- ---------- ---------- 
      
    2. $ vendor/bin/drush config:inspect --only-error
       --------------------- ---------- ---------- 
        Key                   Status     Data      
       --------------------- ---------- ---------- 
        editor.editor.cke4    1 errors             
        media.settings        Correct    1 errors  
        system.theme.global   Correct    1 errors  
        tour.tour.cdn-ui      8 errors             
        update.settings       Correct    1 errors  
       --------------------- ---------- ---------- 
      
    3. $ vendor/bin/drush config:inspect --only-error --detail
       ------------------------------------------------------------------- ---------------- ---------- 
        Key                                                                 Status           Data      
       ------------------------------------------------------------------- ---------------- ---------- 
        editor.editor.cke4:settings.plugins.codesnippet                     missing schema             
        media.settings                                                      Correct          1 errors  
        system.theme.global                                                 Correct          1 errors  
        tour.tour.cdn-ui:tips.cdn-ui-status.attributes                      missing schema             
        tour.tour.cdn-ui:tips.cdn-ui-mapping.attributes                     missing schema             
        tour.tour.cdn-ui:tips.cdn-ui-mapping-type.attributes                missing schema             
        tour.tour.cdn-ui:tips.cdn-ui-mapping-simple-domain.attributes       missing schema             
        tour.tour.cdn-ui:tips.cdn-ui-mapping-simple-scheme.attributes       missing schema             
        tour.tour.cdn-ui:tips.cdn-ui-mapping-simple-conditions.attributes   missing schema             
        tour.tour.cdn-ui:tips.cdn-ui-farfuture.attributes                   missing schema             
        tour.tour.cdn-ui:tips.cdn-ui-streamwrappers.attributes              missing schema             
        update.settings                                                     Correct          1 errors  
       ------------------------------------------------------------------- ---------------- ---------- 
      
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    As you can see, the Drush output matches that in the UI exactly. πŸ€“

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update over 1 year ago
    3 pass
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    #9.3 was actually not yet correct:

    $ vendor/bin/drush config:inspect --only-error --detail
    …
      media.settings                                                      Correct          1 errors  
      system.theme.global                                                 Correct          1 errors  
    …
    update.settings                                                     Correct          1 errors  
    

    should have been:

    1. $ vendor/bin/drush config:inspect --only-error --detail
       --------------------------------------------------------------- ---------------- ----------------------------------------------------- 
        Key                                                             Status           Data                                                 
       --------------------------------------------------------------- ---------------- ----------------------------------------------------- 
        editor.editor.cke4:settings.plugins.codesnippet                 missing schema                                                        
        media.settings:iframe_domain                                    Correct          This value should be of the correct primitive type.  
        system.theme.global:logo.url                                    Correct          This value should be of the correct primitive type.  
        tour.tour.cdn-ui:tips.cdn-ui-status.attributes                  missing schema                                                        
        tour.tour.cdn-ui:tips.cdn-ui-mapping.attributes                 missing schema                                                        
        tour.tour.cdn-ui:tips.cdn-ui-mapping-type.attributes            missing schema                                                        
        tour.tour.cdn-ui:tips.cdn-ui-mapping-simple-domain.attributes   missing schema                                                        
        tour.tour.cdn-ui:tips.cdn-ui-mapping-simple-scheme.attributes   missing schema                                                        
        tour.tour.cdn-ui:tips.cdn-ui-mapping-simple-conditions.attrib   missing schema                                                        
        utes                                                                                                                                  
        tour.tour.cdn-ui:tips.cdn-ui-farfuture.attributes               missing schema                                                        
        tour.tour.cdn-ui:tips.cdn-ui-streamwrappers.attributes          missing schema                                                        
        update.settings:fetch.url                                       Correct          This value should be of the correct primitive type.  
       --------------------------------------------------------------- ---------------- ----------------------------------------------------- 
      

    Fix attached :)

  • Status changed to RTBC over 1 year ago
  • πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

    Yeah I was wondering about #9.3 where it was listing correct stuff too with the only error flag. Looks great IMHO.

    • eb710260 committed on 2.1.x
      Issue #3359418 by Wim Leers: Expose validation constraint violations in...
  • Status changed to Fixed over 1 year ago
  • πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

    Landed, thanks!

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Yay! This unblocks ✨ Expose validation constraints (and validatability %) in Config Inspector UI Fixed β€” expect a big update there later today!

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

Production build 0.71.5 2024