- Issue created by @borisson_
- First commit to issue fork.
- π«π·France hdnag
I took this one from DrupalCon Lille Contribution day
26:21 29:06 Running- @hdnag opened merge request.
26:05 17:31 Running- Status changed to RTBC
about 1 year ago 9:40am 22 October 2023 - π§πͺBelgium borisson_ Mechelen, π§πͺ
This change looks great, thank @hdnag!
- last update
about 1 year ago 30,426 pass - Status changed to Needs work
about 1 year ago 12:47pm 24 October 2023 - π¦π·Argentina dagmar Argentina
Great to see a new validation! However I think the proper validation should be a number 0 or greater. We don't know if someone is altering this value with custom code and the only thing we need to ensure to have dblog working properly is row_limit an unsigned integer.
- First commit to issue fork.
- Status changed to Needs review
about 1 year ago 10:56pm 25 October 2023 - π΅πͺPeru marvil07
@dagmar, I have just pushed a commit with the requested change at #6.
It is an iteration of the change, but using the Range constraint plugin, so it is at least 0.
See https://git.drupalcode.org/issue/drupal-3395631/-/commit/f27c87b9a276613....The changes were on the 11.x branch on the issue fork.
I cherry-picked the commit there to the 3395631-add-validation-constraints topic branch
I also took the chance to rebase on current 11.x. - last update
about 1 year ago 30,438 pass - Status changed to RTBC
about 1 year ago 10:52am 30 October 2023 - last update
about 1 year ago 30,472 pass - last update
about 1 year ago 30,483 pass - last update
about 1 year ago 30,485 pass - last update
about 1 year ago 30,486 pass - last update
about 1 year ago 30,488 pass - last update
about 1 year ago 30,511 pass - last update
about 1 year ago CI error - last update
about 1 year ago 30,530 pass - last update
about 1 year ago 30,552 pass - last update
about 1 year ago 30,574 pass - last update
about 1 year ago 30,603 pass - last update
about 1 year ago 30,605 pass - last update
about 1 year ago 30,667 pass - last update
about 1 year ago 30,675 pass 56:31 51:51 Running- last update
about 1 year ago 30,684 pass - last update
about 1 year ago 30,688 pass - last update
about 1 year ago 30,688 pass - last update
about 1 year ago 30,688 pass - last update
about 1 year ago 30,696 pass - last update
about 1 year ago 30,698 pass - last update
about 1 year ago 30,712 pass - last update
about 1 year ago 30,724 pass - last update
about 1 year ago 30,764 pass - last update
about 1 year ago 30,766 pass - last update
about 1 year ago 25,868 pass, 1,829 fail - last update
about 1 year ago 25,941 pass, 1,799 fail - last update
12 months ago 25,897 pass, 1,843 fail - last update
12 months ago 25,946 pass, 1,792 fail - last update
12 months ago 25,955 pass, 1,808 fail - last update
12 months ago 25,936 pass, 1,812 fail - last update
12 months ago 25,915 pass, 1,832 fail - last update
12 months ago CI aborted - Status changed to Needs work
12 months ago 11:20pm 4 January 2024 - πΊπΈUnited States phenaproxima Massachusetts
We should also mark dblog.settings as
FullyValidatable
while we're at it! - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
@phenaproxima++
This now indeed needs the
FullyValidatable
constraint to be added todblog.settings
. See https://www.drupal.org/node/3404425 β . - Status changed to Needs review
12 months ago 8:17pm 5 January 2024 - Status changed to RTBC
12 months ago 9:12pm 5 January 2024 - last update
12 months ago 25,996 pass, 1,820 fail - last update
12 months ago 25,988 pass, 1,834 fail - Status changed to Fixed
11 months ago 10:43am 9 February 2024 - π¬π§United Kingdom catch
I think this might have broken HEAD https://git.drupalcode.org/project/drupal/-/jobs/781239
- Status changed to Needs work
11 months ago 1:30pm 9 February 2024 - π¬π§United Kingdom catch
Reverted for now - maybe it was just unlucky timing but can't think what else got committed to dblog recently.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
1) Drupal\Tests\dblog\Functional\DbLogViewsTest::testDbLog [Cache] Row limit variable of 1000 equals row limit of 100 Failed asserting that 100 matches expected 1000.
π€― I don't see how this change could've caused that test failure.
- π³π±Netherlands spokje
I've got the same failures in DbLogViewsTest::testDbLog and DbLogTest::testDbLog as @catch around the same time (https://git.drupalcode.org/issue/drupal-3420375/-/jobs/780745) and they were gone after a retest that was done after the revert (https://git.drupalcode.org/issue/drupal-3420375/-/jobs/782021).
- π³π±Netherlands spokje
A rebase later and the testresults now show this is causing the test-failure.
So this MR wasn't synced for about 1 month and was about 250 commits behind.
On drupalCI we tested merge-able patches every 2 days, that isn't done on GitLabCI apparently?
- πΊπΈUnited States phenaproxima Massachusetts
This is breaking because, when
\Drupal\Tests\dblog\Functional\DbLogTest::verifyRowLimit()
submits the form at /admin/config/development/logging, it actually runs into a validation error raised by the form, which it fails to catch because the status code is still 200.That error is "'langcode' is a required key".
Makes sense - if you look at
config_object
incore.data_types.yml
, you'll see that all config objects have alangcode
key, and it is required (all keys of mappings are required by default unless they explicitly opt out): https://git.drupalcode.org/project/drupal/-/blob/11.x/core/config/schema...So why didn't this break before? Because that required-ness is only checked for config objects that have opted into the
FullyValidatable
constraint, which until this issue did not includedblog.settings
. But now that we're opting in, we're strictly checking it. And, like most config shipped with core,dblog.settings.yml
doesn't include alangcode
key. Some core config does, other core config doesn't.So I'm thinking the solution here is to add
langcode: en
todblog.settings.yml
, which will make it consistent with some of the other config core ships.We might also need an update path? Not sure...
- πΊπΈUnited States phenaproxima Massachusetts
Crediting myself for the debuggin'. :)
- Status changed to Needs review
11 months ago 4:21pm 9 February 2024 - πΊπΈUnited States phenaproxima Massachusetts
Oh, and about that update path...if we do it, we might want to do it in a separate issue, and have it ensure the
langcode
key exists in all simple config.Otherwise we're almost guaranteed to run into this again as we make more and more of core's config schema-compliant, and then you gotta wonder if it's better to have lots of little update paths which all do the same thing (dear god, no)...or just have one big one that fixes this known schema compliance issue.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
I see now. The last CI run was on January 5 (https://git.drupalcode.org/issue/drupal-3395631/-/pipelines/72532) for the last commit (https://git.drupalcode.org/project/drupal/-/merge_requests/5130/diffs?co...).
Somehow GitLab CI didn't re-test this in the month that passed since then? π±
Surfacing that in the
#gitlab
Drupal Slack channel⦠- Status changed to Needs work
11 months ago 4:57pm 9 February 2024 - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Oh, and about that update path...if we do it, we might want to do it in a separate issue, and have it ensure the
langcode
key exists in all simple config.I propose we do this one separately first, and then a new issue for all others. That allows us to learn here and apply the pattern across all of core.
or just have one big one that fixes this known schema compliance issue.
That sounds too broad. But this one is particularly simple: literally ALL config objects must have a
langcode
key per the config schema:config_object: type: mapping mapping: _core: # This only exists for merging configuration; it's not required. requiredKey: false type: _core_config_info langcode: type: langcode
- Status changed to Needs review
11 months ago 6:02pm 9 February 2024 - πΊπΈUnited States phenaproxima Massachusetts
Update path and update path test added.
- Status changed to RTBC
11 months ago 10:46pm 10 February 2024 - π§πͺBelgium borisson_ Mechelen, π§πͺ
I think the update path and update path test are good, and the change to the existing config will prevent this from happening.
- Status changed to Fixed
10 months ago 12:35pm 12 February 2024 - π¬π§United Kingdom catch
The direct post-update for dblog.settings is OK here because it will catch exported config but doesn't need to be applied to shipped config from modules/install profiles.
Committed/pushed to 11.x, thanks!
Automatically closed - issue fixed for 2 weeks with no activity.