Problem/Motivation

Follow-up to #3559412: Upgrade behat/mink and behat/mink-browserkit-driver for PHP 8.5
All pipeline's jobs with mysqli driver fails

Time: 00:01.168, Memory: 8.00 MB
    
    Rss Default Row View Mode Update (Drupal\Tests\views\Functional\Update\RssDefaultRowViewModeUpdate)
     ✘ Rss default row view mode update
       ┐
       ├ Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "request_stack".
       │
       │ /builds/issue/drupal-3559412/vendor/symfony/dependency-injection/ContainerBuilder.php:1048
       │ /builds/issue/drupal-3559412/vendor/symfony/dependency-injection/ContainerBuilder.php:614
       │ /builds/issue/drupal-3559412/vendor/symfony/dependency-injection/ContainerBuilder.php:577
       │ /builds/issue/drupal-3559412/core/tests/Drupal/Tests/BrowserTestBase.php:428
       ┴
    
    ERRORS!
    Tests: 2, Assertions: 0, Errors: 1, Skipped: 1.

Steps to reproduce

See jobs using mysqli https://git.drupalcode.org/issue/drupal-3559412/-/pipelines/668105

Proposed resolution

  • Check for existence of the request_stack service before trying to get it. During tearDown, it's not that relevant.
  • Add a mysqli set of jobs for commit and daily pipelines - they are missing ATM

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3560690

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

andypost created an issue. See original summary.

andypost’s picture

probably the cause is \Drupal\FunctionalTests\Update\UpdatePathTestBase::doInstall()

      // If the db driver is mysqli, we do not need to run the update tests for
      // db dumps prior to 11.2 when the module was introduced.
      if (Database::getConnection()->getProvider() === 'mysqli' && $dumpVersion && version_compare($dumpVersion, '11.2.0', '<')) {
        $this->markTestSkipped("The mysqli driver was introduced in Drupal 11.2, skip update tests from database at version {$dumpVersion}");
      }
andypost’s picture

Title: CI: PHPUnit Functional tests consistently fails » CI: Functional Upgrade tests consistently fails on mysqli

more precise title

andypost’s picture

Status: Active » Needs review
mondrake’s picture

Priority: Normal » Critical
Status: Needs review » Reviewed & tested by the community

Changes are in teardown and tests runs are green. Thanks

mondrake’s picture

I think the IS needs to adjust the proposed resolution as it's very different from the MR

catch’s picture

Status: Reviewed & tested by the community » Needs work

Yes please.

mondrake’s picture

Issue summary: View changes
Issue tags: -Needs issue summary update
mondrake’s picture

Status: Needs work » Needs review

The fix is good sense: you don't want to execute a method on a service that is not available, especially since we are at test tearDown and there's not much need to clear the session AFAICS.

What'd be interesting to find out is why tests fail for mysqli, but for other drivers don't. But that's IMHO lower priority than fixing the issue here which is a Critical. Follow up for that?

mondrake’s picture

Issue summary: View changes
mondrake’s picture

Issue summary: View changes
mondrake’s picture

Title: CI: Functional Upgrade tests consistently fails on mysqli » CI: Functional update test consistently fail on mysqli
mondrake’s picture

Title: CI: Functional update test consistently fail on mysqli » CI: Functional update tests consistently fail on mysqli
smustgrave’s picture

Status: Needs review » Needs work

Sorry to be that guy, needs a rebase please.

mondrake’s picture

Status: Needs work » Needs review

Rebase Xmas Edition. Happy holidays!

smustgrave’s picture

Left a comment

Happy holidays to you too!

mondrake’s picture

Changed as suggested

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Going on a limb and marking but the 1 feedback I saw was addressed.

xjm’s picture

Getting mixed signals... The MR is still marked as a draft. :) If it is not a draft, please mark it as ready. :)

mondrake’s picture

Only the author can do the un-drafting, so please @andypost the honor is yours

andypost’s picture

+1 RTBC, marked as ready

mondrake’s picture

Title: CI: Functional update tests consistently fail on mysqli » Functional update tests consistently fail on mysqli

  • xjm committed 0d98f6ee on 11.x
    fix: #3560690 Functional update tests consistently fail on mysqli
    
    By:...
xjm’s picture

Status: Reviewed & tested by the community » Patch (to be ported)

Committed to 11.x, thanks!

It did not cherry-pick cleanly to 11.3.x, but I assume we want it there too?

mondrake’s picture

It did not cherry-pick cleanly to 11.3.x, but I assume we want it there too?

It's probably due to #3562159: Make it easier to run test-only job against different PHP / DB combinations not being backported. If there's no need for that, then I'd say there's no need here either. Otherwise I'd suggest to backport that first to have the pipelines in sync.

catch’s picture

Status: Patch (to be ported) » Reviewed & tested by the community

Usually a bit hesitant to backport big CI changes because sooner or later we change something we don't want to backport (like default PHP version), but went ahead and backported that one so this can get in easier.

  • xjm committed d6b0be89 on 11.3.x
    fix: #3560690 Functional update tests consistently fail on mysqli
    
    By:...
xjm’s picture

Status: Reviewed & tested by the community » Fixed

Cherry-picked to 11.3.x as well now, and adding credit for @catch on review of the backport. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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