Needs review
Project:
Drupal core
Version:
main
Component:
phpunit
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Oct 2026 at 07:53 UTC
Updated:
9 Oct 2026 at 07:37 UTC
Jump to comment: Most recent
The container_rebuild_test test module uses the state system to record the number of container rebuilds.
The state system has caching in front of it, which isn't necessary or desirable for this kind of testing, so we should convert the module, and all tests that rely on it, to use the key value service directly.
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
Comment #2
leandro713 commentedliking to work on this
Comment #4
leandro713 commentedThe merge request replaces the state service with direct access to its
underlying key/value collection in the container rebuild test module and its
functional test.
The now-unnecessary state cache refreshes have also been removed.
Local checks:
- PHP syntax checks passed.
- PHPCS passed.
- The functional test was not run locally because a functional test environment
is not configured. It is being exercised by CI.
AI-Generated: Yes. I used ChatGPT to help analyse and draft the initial change.
I reviewed the resulting diff and ran the reported checks locally.
Comment #5
catchThis should use a custom collection name rather than 'state'.
Comment #6
leandro713 commentedThanks! The merge request now uses the dedicated
`container_rebuild_test` key/value collection, with `count` as the key.
`RebuildScriptTest` has been updated accordingly.
Comment #7
leandro713 commentedComment #8
smustgrave commentedPosting this as this may violate our AI policy
https://www.drupal.org/docs/develop/issues/issue-procedures-and-etiquett...
Comment #9
leandro713 commentedThanks for pointing me to the policy. I have read it and would like to clarify how I used AI for this contribution.
I used ChatGPT to suggest an initial implementation and help draft the merge request text. I independently reviewed and understood every code change, ran the reported local checks, incorporated catch's feedback, and verified the updated result. I take full responsibility for the submitted work.
English is not my first language, and Drupal core issues can involve complex technical discussions. Before investing effort in a contribution, I use AI as a supporting tool to check that I have understood the problem correctly and to express my reasoning clearly in English. It does not replace my own technical judgement or responsibility; it helps me avoid misunderstandings caused by language.
If there is a specific part of the contribution or disclosure that does not meet the policy, please let me know and I will correct it.