Problem/Motivation
Condition plugin validation schema is wrong.
`condition.plugin` includes uuid, which is not present at all (these aren't config entities, just used inside config entities).
This might have passed unnoticed as we didn't add `FullyValidatable` to block settings until recently (#3379725: Make Block config entities fully validatable).
Proposed resolution
- Remove
uuid.
- Make `
context_mapping` not required.
Remaining tasks
Fix config schema and related tests.
User interface changes
None.
Introduced terminology
None.
API changes
None.
Data model changes
Config schema changes, but these are expected?
Release notes snippet
None.
Comments
Comment #2
penyaskitoComment #3
penyaskitoVerified context_mapping applies here. But shouldn't be mandatory.
Comment #5
penyaskitoFixed config schema and related tests.
Comment #6
wim leers🏓 — missing some crucial info that will be necessary for this to become committable — right now, it's not clear whether this would break contrib/custom modules 😇
This was surfaced by #3525601: Personalization Segment storage: new `Segment` config entity type.
Comment #7
mstrelan commentedComment #8
penyaskito🏓 Back to NR for feedback.
We can definitely be extra-safe and make uuid optional instead of removing it, but Occam's Razor says this was a copypasta 10 years ago.
Comment #9
smustgrave commented@wimleers thoughts on the comments in the MR?
Comment #10
smustgrave commentedThere's 1 thread that's unanswered could that be addressed.
Comment #11
smustgrave commentedLooking at this again won't we need an update hook, using ConfigImporter, to remove the UUID from existing config.
Comment #13
borisson_This doesn't need that update hook, because the config currently does not reflect reality. I just grepped in my config folder for 2 projects. (both on context_mapping and visibility), in both cases the uuid does not show up.
Since both merge request comments are about the same thing, I think both are answered by this + #8.
Comment #14
borisson_I actually think this is rtbc.
Comment #19
longwaveLooks good to me too. Backported down to 10.6.x as it corrects a bug in schema.
Committed and pushed 28b81cc545f to main and fb0632b33ca to 11.x and a5831a7dc39 to 11.3.x and 25c4571c057 to 10.6.x. Thanks!
Comment #22
mxr576+1
And probably this should not have been merged into 11.3.x and released in 11.3.4 because it broke our automated CI pipeline and automated tests started to fail due to
Drupal\Core\Config\Schema\SchemaIncompleteException.I haven't tested it, but I assume it could happen that site install from existing configuration could also fail in "strict" environments where
\Drupal\Core\Config\Development\ConfigSchemaCheckeris enabled since the beginning, and\Drupal\Core\Config\Development\LenientConfigSchemaCheckercould create a bunch of noise.Comment #23
mxr576It shows up in pathauto configurations.
Comment #24
longwave@mxr576 should we revert this and try again?
Comment #25
mxr576My colleague (@morvaim) just clarified the issue we experienced related to this change and it is possible that only Pathauto was doing something special and requires fixing after this change, see #3577286: Drupal core 11.3.4 removed uuid from condition plugin schema which causes schema errors in pathauto pattern configuration.
Comment #26
longwaveGiven this has broken pathauto I am going to revert this from 10.6 and 11.3 and re-release; this fix will then go out for real in 11.4 which gives pathauto and anyone else affected time to write their update hooks.
Comment #29
mxr576reopening the issue
Comment #30
longwaveDo you think there is more to do here? ie, should we revert from 11.x and main as well, or should we leave that in place and it's up to contrib modules to handle updates? Given that I don't think core can know where this schema might be used, I am not sure what more we can do from the core side.
Comment #31
borisson_I agree with #30, I don't think there is more to do, I think we can move this issue back to fixed.
Comment #32
godotislateRe #26/30: Do we need a change record to help prepare people for 11.4/12.0?
Comment #33
longwaveNot sure we need a change record for every schema change, just have to remember to only make them in minor releases and not patch releases.