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

Command icon 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

spokje created an issue. See original summary.

spokje’s picture

Issue summary: View changes

spokje’s picture

By changing \Drupal\Tests\language\Functional\LanguageNegotiationInfoTest::testInfoAlterations we 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::testInfoAlterations and \Drupal\Tests\comment\Functional\CommentLanguageTest and 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.

spokje’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Based on the other ones and @spokje excellent work in #5 breaking it down, clearly this is a net gain.

  • larowlan committed f98eac78 on 11.1.x
    Issue #3496438 by spokje: [random test failure]...

  • larowlan committed 329d60ea on 11.x
    Issue #3496438 by spokje: [random test failure]...
larowlan’s picture

Version: 11.x-dev » 11.1.x-dev
Status: Reviewed & tested by the community » Fixed

Committed to 11.x and backported to 11.1.x - nice one 😎

larowlan changed the visibility of the branch 3496438-multi-run-key-value to hidden.

larowlan changed the visibility of the branch 3496438-multi-run-as-is to hidden.

spokje’s picture

To 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.

spokje changed the visibility of the branch 11.x to hidden.

spokje’s picture

Version: 11.1.x-dev » 11.0.x-dev
Status: Fixed » Needs review

Ah, 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.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

For the backport

  • catch committed 0face051 on 10.3.x
    Issue #3496438 by spokje, larowlan: [random test failure]...

  • catch committed 500e5e70 on 10.4.x
    Issue #3496438 by spokje, larowlan: [random test failure]...

  • catch committed 2a544472 on 10.5.x
    Issue #3496438 by spokje, larowlan: [random test failure]...

  • catch committed ab7f10d5 on 11.0.x
    Issue #3496438 by spokje, larowlan: [random test failure]...
catch’s picture

Version: 11.0.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.0.x and cherry-picked back through to 10.3.x for hopefully happier branch pipeline runs.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.