Problem/Motivation
Language Negotiation Info (Drupal\Tests\language\Functional\LanguageNegotiationInfo)
✘ Info alterations
┐
├ Interface language negotiation method removed from the stored settings.
├ Failed asserting that true is false.
│
│ /builds/issue/drupal-3069442/core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php:117
┴
✔ Config lang type alterations
Steps to reproduce
Example: https://git.drupalcode.org/issue/drupal-3069442/-/jobs/3468071#L1431
Proposed resolution
Replace calls to State with calls to KeyValue.
The root cause of this issue is discussed in #3496257: Race conditions in CacheCollector/State (again)
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3496438
Show commands
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
spokjeComment #5
spokjeBy changing
\Drupal\Tests\language\Functional\LanguageNegotiationInfoTest::testInfoAlterationswe also change\Drupal\Tests\comment\Functional\CommentLanguageTest, so we need to include both in our multiple runs.MR !10733 (which is basically
\Drupal\Tests\language\Functional\LanguageNegotiationInfoTest::testInfoAlterationsand\Drupal\Tests\comment\Functional\CommentLanguageTestand some pipeline changes to make both, and only both, run 3000 times) gives us 2b fails out of the 3000 runs.MR !10734 shows that changing \Drupal::state()->set()/get() to Drupal::keyValue()->set()/get(); passes a 5000 times + 5000 times run without errors. (The fail rate as so low that I've ran it twice)
It shows up as failed _probably_ because the artifacts are too big to upload, however the log runs out of space so we can't be sure of that.
MR !10735 contains the changes we want committed after review.
Comment #7
spokjeComment #8
smustgrave commentedBased on the other ones and @spokje excellent work in #5 breaking it down, clearly this is a net gain.
Comment #11
larowlanCommitted to 11.x and backported to 11.1.x - nice one 😎
Comment #15
spokjeTo keep in line ay want to backport these random-state-failures as far back as 10.3.x?
We have been doing that we all the other fixes that landed so far.
Comment #18
spokjeAh, I see the MR doesn't cleanly apply to 11.0.x and lower, due to the OOP-ing of hooks.
We've been there before in other issues, and if it's anything similar as those, the 11.0.x MR will backport down to 10.3.x without issues.
Comment #19
smustgrave commentedFor the backport
Comment #24
catchCommitted/pushed to 11.0.x and cherry-picked back through to 10.3.x for hopefully happier branch pipeline runs.