Problem/Motivation

system.cron has 3 property path that are not yet validatable:

./vendor/bin/drush config:inspect --filter-keys=system.cron --detail --list-constraints
➜  🤖 Analyzing…

 Legend for Data: 
  ✅❓  → Correct primitive type, detailed validation impossible.
  ✅✅  → Correct primitive type, passed all validation constraints.
 --------------------------------------------- --------- ------------- ------ ------------------------------------------ 
  Key                                           Status    Validatable   Data   Validation constraints                    
 --------------------------------------------- --------- ------------- ------ ------------------------------------------ 
  system.cron                                   Correct   56%           ✅❓   ValidKeys: '<infer>'                      
   system.cron:                                 Correct   Validatable   ✅✅   ValidKeys: '<infer>'                      
   system.cron:_core                            Correct   Validatable   ✅✅   ValidKeys:                                
                                                                                 - default_config_hash                   
   system.cron:_core.default_config_hash        Correct   Validatable   ✅✅   NotNull: {  }                             
                                                                               Regex: '/^[a-zA-Z0-9\-_]+$/'              
                                                                               Length: 43                                
                                                                               ↣ PrimitiveType: {  }                     
   system.cron:logging                          Correct   NOT           ✅❓   ⚠️  @todo Add validation constraints here  
   system.cron:threshold                        Correct   Validatable   ✅✅   ValidKeys: '<infer>'                      
   system.cron:threshold.requirements_error     Correct   NOT           ✅❓   ⚠️  @todo Add validation constraints here  
   system.cron:threshold.requirements_warning   Correct   NOT           ✅❓   ⚠️  @todo Add validation constraints here  
 --------------------------------------------- --------- ------------- ------ ------------------------------------------ 

Steps to reproduce

  1. Get a local git clone of Drupal core 11.x.
  2. composer require drupal/config_inspector — or manually install https://www.drupal.org/project/config_inspector/releases/2.1.5 or newer (which supports Drupal 11!)
  3. composer require drush/drush
  4. vendor/bin/drush config:inspect --filter-keys=system.cron --detail --list-constraints

Proposed resolution

Add validation constraints to:

  1. system.cron:logging
  2. system.cron:threshold.requirements_error
  3. system.cron:threshold.requirements_warning

For examples, search *.schema.yml files for the string constraints: 😊

Reach out to @borisson_ or @wimleers in the #distributions-and-recipes.

Remaining tasks

User interface changes

None.

API changes

Data model changes

More validation 🚀

Release notes snippet

None.

Issue fork drupal-3436671

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

narendraR created an issue. See original summary.

narendrar’s picture

Status: Active » Needs review
wim leers’s picture

Status: Needs review » Needs work
narendrar’s picture

Status: Needs work » Needs review
wim leers’s picture

Status: Needs review » Needs work
Issue tags: +Needs update path

That was too sloppy.

If you'd have read the code you added @sees for, you'd have spotted that the config schema does not make sense.

narendrar’s picture

Status: Needs work » Needs review
phenaproxima’s picture

Issue tags: -Needs update path

I think that makes sense. Removing the update path tag; this very clearly has one now.

Only one question, then I'd be okay RTBCing this.

phenaproxima’s picture

Status: Needs review » Reviewed & tested by the community

No complaints here!

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed b59a6f101b to 11.x and a15b012100 to 10.3.x. Thanks!

  • alexpott committed a15b0121 on 10.3.x
    Issue #3436671 by narendraR, Wim Leers, phenaproxima: Add validation...

  • alexpott committed b59a6f10 on 11.x
    Issue #3436671 by narendraR, Wim Leers, phenaproxima: Add validation...
wim leers’s picture

👏

Status: Fixed » Closed (fixed)

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