- Issue created by @mparker17
- Merge request !8068Issue #3447145: Improve database performance when computing ModerationStateFieldItemList. β (Open) created by mparker17
- Status changed to Needs review
6 months ago 3:32pm 14 May 2024 - π¨π¦Canada mparker17 UTC-4
I don't think it's possible to write tests for this, but if you have ideas, I would very much appreciate some mentorship on how to write them!
Going to leave this as "Needs review". Feedback is welcome!
- Status changed to Needs work
6 months ago 3:42pm 14 May 2024 - π¨π¦Canada mparker17 UTC-4
I should add an update hook for existing sites...
- Status changed to Needs review
6 months ago 1:51pm 15 May 2024 - π¨π¦Canada mparker17 UTC-4
Added an update hook. Feedback welcome!
Tagging with "Performance" because it affects performance. Tagging with "PostgreSQL" because it particularly affects sites running on the PostgreSQL database. See the Issue tags -- special tags documentation β for more information.
- Status changed to Needs work
6 months ago 5:23pm 19 May 2024 - πΊπΈUnited States smustgrave
Believe we will need test coverage for the update hook/change.
Number for the update probably needs to be updated as well but not sure what the standard is now with 11 and 10.3 out, TBD.
- π¨π¦Canada mparker17 UTC-4
Believe we will need test coverage for the update hook/change.
@smustgrave, are there any docs or examples on how to do this?
Number for the update probably needs to be updated as well but not sure what the standard is now with 11 and 10.3 out, TBD.
[...]
Related issue: π Handling update path divergence between 11.x and 10.x FixedFWIW, I expect to have to re-roll this patch before committing, i.e.: to keep up with the latest hook_update_N() number.
Perhaps I misread, but I didn't see anything in #3108658 that I can act on for this patch at this time?
Thanks for the feedback, everyone!
- πΊπΈUnited States smustgrave
Believe the update hook number will have to be 10401 according to @catch in slack https://drupal.slack.com/archives/C03L6441E1W/p1716139451323549
- π¨π¦Canada mparker17 UTC-4
@smustgrave, updated!
If anyone has some examples or docs on how to write tests for update hooks for the content_moderation module, I'd appreciate it! Asking because...
- I don't see any fixtures inside
core/modules/content_moderation
- The fixtures in
core/modules/system/tests/fixtures/update/
don't havecontent_moderation
pre-installed - Importing a fixture from
core/modules/system/tests/fixtures/update/
and then installingcontent_moderation
in thesetUp
create the table with the new index (i.e.: wouldn't actually test the update hook) - Copying-and-modifying a content-fixture blob seems like it could be hard for reviewers to review, and would add 584 MB to the size of core, roughly equivalent to 7.3 minified jQuery libraries (80 MB as reported by
du -h core/assets/vendor/jquery/jquery.min.js
at time-of-writing)
(aside, is measuring filesize in terms of "minified jQuery libraries" the Drupal equivalent of describing lengths in "football fields"?)
- I don't see any fixtures inside