Problem/Motivation

On Dec 30, #3391990: Automated report on core config validatability landed. That now generates an up-to-date visualization of core config validatability daily:

It is currently underestimating (the brown and pink lines) because #3364109: Configuration schema & required values: add test coverage for `nullable: true` validation support did not update the ones listed/surfaced by #35. This issue does that.

Steps to reproduce

N/A

Proposed resolution

Mark the following as fully validatable

  1. comment.settings
  2. menu_ui.settings
  3. node.settings
  4. system.maintenance
  5. system.feature_flags
  6. taxonomy.settings

Most of these contain only type: boolean key-value pairs. The last one contains one type: integer with an explicit validation constraint (added in #3395563: Add validation constraints to taxonomy.settings). Another one contains only a type: text which already has validation constraints (since #3379102: Add validation constraint to `type: label` + `type: text`: disallow control characters)

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3412084

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

Wim Leers created an issue. See original summary.

borisson_’s picture

Title: Follow-up for #3364109: opt in already validatgable simple config to FullyValidatable » Follow-up for #3364109: opt in already validatable simple config to FullyValidatable

wim leers’s picture

Assigned: wim leers » Unassigned
Status: Active » Needs review

How will this affect overall core config validatability?

$ vendor/bin/drush pm:install config_inspector
$ vendor/bin/drush config:inspect --statistics > 3412084.json
$ curl https://project.pages.drupalcode.org/-/config_inspector/-/jobs/559249/artifacts/validatability-report/statistics/2024-01-02.json > HEAD.json
$ /usr/bin/diff --side-by-side HEAD.json 3412084.json | head -n 11
{									{
    "assessment": {							    "assessment": {
        "_description": "Default assessment generated fro		        "_description": "Default assessment generated fro
        "typesFullyValidatable": 0.005263157894736842,		|               "typesFullyValidatable": 0.01584507042253521,
        "typesInUse": 0.35789473684210527,			|               "typesInUse": 0.35563380281690143,
        "typesInUsePartiallyValidatable": 1,				        "typesInUsePartiallyValidatable": 1,
        "typesInUseFullyValidatable": 0.01470588235294117       |               "typesInUseFullyValidatable": 0.04455445544554455
        "typesInUsePropertyPathsFullyValidatable": 0.0059       |               "typesInUsePropertyPathsFullyValidatable": 0.0072
        "objectPropertyPathsValidatable": 0.5299947835159       |               "objectPropertyPathsValidatable": 0.5309928208720
        "objectPropertyPathsFullyValidatable": 0.00591201       |               "objectPropertyPathsFullyValidatable": 0.00726667
    },									    },

from 0.5% to 1.5% fully validatable types, and from 1.47% of in-use types being fully validatable to 4.45%.

IOW: this would make the brown and pink lines on https://project.pages.drupalcode.org/config_inspector/ go up quite noticeably 🤓

borisson_’s picture

Status: Needs review » Needs work

ConfigSchemaTest::testSchemaMapping has a failure. If that's fixed we can rtbc this.

phenaproxima made their first commit to this issue’s fork.

phenaproxima’s picture

Status: Needs work » Needs review

The failing test has an out-of-date expectation. Adjusted that, and now it passes for me (locally, anyway).

borisson_’s picture

Status: Needs review » Reviewed & tested by the community

Looks great to me.

  • larowlan committed 76e00a56 on 11.x
    Issue #3412084 by Wim Leers, phenaproxima, borisson_: Follow-up for #...
larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 11.x, nice one folks 🥳

larowlan’s picture

Status: Fixed » Needs work

  • larowlan committed 1d5e1e1d on 11.x
    Revert "Issue #3412084 by Wim Leers, phenaproxima, borisson_: Follow-up...
wim leers’s picture

Assigned: Unassigned » wim leers

Very odd that it passed in the MR's test 🤔

Ah I see why … somehow this issue fork was created without #3364108: Configuration schema & required keys being present in the 11.x history of the fork 🤷‍♂️ And not enough time had passed for auto-retesting of RTBC against latest upstream.

So: merged in upstream 11.x, now this should fail too.

wim leers’s picture

Assigned: wim leers » Unassigned
Status: Needs work » Needs review

That failed as expected 👍

The fix is two-fold:

  1. Trivial: PendingRevisionTest failed to install the default config of the Taxonomy module … and should have been doing that all along.
  2. Simple: the taxonomy_settings migration: it was generating incomplete Drupal 8/9/10 config since the day it was introduced (#2154955: Migrate variables to config in 2014), because taxonomy.settings:maintain_index_table has existed since 2009 in Drupal 7 (see #412518: Convert taxonomy_node_* related code to use field API + upgrade path), its configuration schema was introduced in #1919208: Create configuration schemas for taxonomy module in 2013. But … it was not set by default: its absence was treated as taxonomy_maintain_index_table === TRUE.

It might be better to split off the taxonomy parts into a separate issue. Or, alternatively, to expand \Drupal\Core\Config\Schema\SchemaCheckTrait::$ignoredPropertyPaths rather than fixing the migration. Leaving that up to the reviewers to decide.

borisson_’s picture

I would prefer to update the $ignoredPropertyPaths, we will have to go trough those eventually and that way this issue doesn't get postponed?

wim leers’s picture

Assigned: Unassigned » wim leers
Status: Needs review » Needs work
Related issues: +#3413126: Add "maintain_index_table" to taxonomy_settings migration

That was very fast 😅 Will do! Follow-up created already: #3413126: Add "maintain_index_table" to taxonomy_settings migration.

wim leers’s picture

Assigned: wim leers » Unassigned
Status: Needs work » Needs review

Addressed #17. 👍

borisson_’s picture

Status: Needs review » Reviewed & tested by the community

With 11.x now merged into this branch again and the tests green + the reasoning in #16 + #18 I think this is rtbc again.

phenaproxima’s picture

I don't really have any objections here. The migration-related follow-up looks pretty good to me as well. +1 RTBC.

wim leers’s picture

Status: Reviewed & tested by the community » Needs work
wim leers’s picture

Status: Needs work » Reviewed & tested by the community

MR updated by deleting a handful of lines 👍 Back to RTBC!

phenaproxima’s picture

Status: Reviewed & tested by the community » Needs work

I'm seeing test failures on GitLab CI...

wim leers’s picture

Assigned: Unassigned » wim leers

… because I forgot to merge in upstream 🙈

wim leers’s picture

Assigned: wim leers » Unassigned
Status: Needs work » Reviewed & tested by the community

git merge origin/11.x + push → green now 👍

  • catch committed 6b6a8262 on 11.x
    Issue #3412084 by Wim Leers, phenaproxima, borisson_, larowlan: Follow-...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x, thanks!

Status: Fixed » Closed (fixed)

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

wim leers’s picture