Closed (fixed)
Project:
Drupal core
Version:
10.2.x-dev
Component:
configuration system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Nov 2023 at 15:18 UTC
Updated:
1 Dec 2023 at 15:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #7
wim leersDetermined the root cause:

$thiswas assumed to be the test class. Unfortunately, this is inaccurate, because it depends on WHAT is calling\Drupal\Core\Config\Schema\SchemaCheckTrait::checkConfigSchema():\Drupal\Tests\SchemaCheckTestTrait::assertConfigSchema()\Drupal\Core\Config\Development\ConfigSchemaChecker::onConfigSave(), which happens to be called when … installing configuration during testsOOPS 😱
IMHO this is a
10.2.xbeta blocker because virtually every contrib maintainer will run into this 😅🙈Comment #9
xjmComment #10
wim leers10.2.x, see #3400868: [PP-2] to_email and similar config keys have schema type email but allow other things. So I automated testing that in #3402134: Test Webform against upcoming 10.2.x on GitLab CI — and use concurrency to make tests 6x faster (on GitLab CI). The test results confirm what @Berdir said. Which makes this critical because it disrupts contrib significantly 😐👆 Fixed in https://git.drupalcode.org/project/drupal/-/merge_requests/5430/diffs?co...
Comment #11
wim leers👆 Fixed in https://git.drupalcode.org/project/drupal/-/merge_requests/5430/diffs?co...
Comment #12
alexpottI don't think this fix will work because the schema checker also runs in the site under test. See \Drupal\Core\Test\FunctionalTestSetupTrait::prepareSettings().
We need to pass another argument into the testing.config_schema_checker service to determine whether to do config validation - this argument can be based on the test class.
Comment #13
wim leersI will run the Webform test suite against
10.2.x+ this MR to verify.Comment #14
wim leersFirst made the Webform test suite run much faster on GitLab CI, then used @Berdir's tip in Slack to automatically test with this MR on 10.2.
Quoting the findings from #3402134-12: Test Webform against upcoming 10.2.x on GitLab CI — and use concurrency to make tests 6x faster (on GitLab CI):
On it …
Comment #15
wim leers2926c398 is a hardening that fixes the incomplete detection logic, resulting in more functional tests passing, but not all:
Now working on the actual bug that @alexpott pointed out, which only occurs if the the functional test is using the UI to make changes to config. This is true for
\Drupal\Tests\webform\Functional\Settings\WebformSettingsSerialTestfor example, as this HTML response it triggers proves:Comment #17
wim leersc0ae1f84 made the Webform test suite pass — with the exception of unrelated failures (for example,
WebformStatesHiddenTestandWebformSettingsPreviewTestfail because it's asserting markup literally instead of using CSS selectors, XPath or DOMDocument — probably these output changes are due to #2441811: Upgrade filter system to HTML5). See the results.Comment #18
wim leers@alexpott's alternative MR looks much simpler and achieves the same. 👍 I was just trying to minimize change, but I'm of course fine with his proposal.
However, his proposal only fixes problem #2 in the issue summary, not problem #1 (i.e no deprecation error for contrib modules … at least not yet, because even that is considered too disruptive). The new name of the new argument he proposed is so strongly connected to deprecation errors that we're forced to. So my only concern with the MR is the
$triggerDeprecationOnValidationErrorargument.Unless … @alexpott now thinks that the deprecation error is actually fine to keep? 🤔
Comment #19
wim leersTesting Alex' MR (commit: https://git.drupalcode.org/project/webform/-/merge_requests/380/diffs?co...).
Hopefully these will match:
(Which is possible despite his MR still triggering a deprecation error because Webform is suppressing deprecations.)
Update: they do match! 👍 — when grapping the results page for the string
0 passes(55 occurrences),exceptions(27 occurrences),fails(28 occurrences)Comment #21
wim leersCannot find a single remaining thing to complain about in @alexpott's alternate MR.
The test results for
webformon top of his MR still (see #17) match ✅It's a very different approach from mine — much simpler, more explicit, less magic. 👍 My only contribution to this MR is adding a data provider to the test.
Comment #22
wim leers… except that our YAML parsing of
services.ymlfiles does not quite like enums yet:😬
Comment #23
wim leersComment #24
wim leersReady now :)
Comment #27
catchThis looks good, easy to follow the new logic and mostly moving things around otherwise. Committed/pushed to 11.x and cherry-picked to 10.2.x, thanks!