Problem/Motivation

Postgres test runs fail on an uncaught exception in the installer.

See #2548725-28: Fix regression to menu serialization in upgrade path that causes thousands of errors in PostgreSQL which fixed some, but not all of these.

Proposed resolution

Find out which other exception is being thrown, and handle it properly.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#12 interdiff.txt866 bytesdawehner
#12 2561121-12.patch1.82 KBdawehner
#11 2561121.11.patch1.27 KBalexpott

Comments

catch created an issue. See original summary.

jhedstrom’s picture

Assigned: Unassigned » jhedstrom

I'll take a look.

jhedstrom’s picture

Assigned: jhedstrom » Unassigned

I cannot reproduce any of the failing tests from https://www.drupal.org/pift-ci-job/25433 locally using Postgres 9.3.5. However, the exceptions in that test run reminded me of the inconsistent fails in #2266871: Update Notify fails to send email in AutomaticCron which were due to services being requested after the onTerminate events had been called (by the automatic cron runner, which has an equal weight to KernelDesctructionSubscriber).

I may have time later to spin up a VM with Postgres 9.1 to see if the exceptions can be reproduced.

dawehner’s picture

@jhedstrom
You might have a good time when you try to use https://www.drupal.org/project/drupalci_testbot

jhedstrom’s picture

Actually, this exception:

exception: [Uncaught exception] Line 868 of core/vendor/symfony/dependency-injection/ContainerBuilder.php:
Symfony\Component\DependencyInjection\Exception\InvalidArgumentException: The service definition "renderer" does not exist.

would happen if our installer error handling somewhere relied on the renderer service (further down in the failed test run are some serialization notices, which might attempt to display the message). I thought we'd resolved those early error handling issues though.

dawehner’s picture

would happen if our installer error handling somewhere relied on the renderer service (further down in the failed test run are some serialization notices, which might attempt to display the message). I thought we'd resolved those early error handling issues though.

Well, the problem afaik is that we rely on the database for the container, so I guess for the installer we might have to switch to not try to get the container from cache?

jhedstrom’s picture

Sadly, I cannot reproduce the fails even using https://www.drupal.org/project/drupalci_testbot locally (php 5.5/pgsql 9.1). I tried the aggregator and basic_auth test groups, and they all pass.

jhedstrom’s picture

This test fails locally Drupal\system\Tests\Entity\Update\SqlContentEntityStorageSchemaIndexFilledTest in drupalci.

alexpott’s picture

#8 is #2561229: Upgrade content tests fails on postgres for translated comment - not related to this (unfortunately)

I've got some more info by removing the call to the render system...

exception: [Uncaught exception] Line 481 of core/includes/install.core.inc:
Drupal\Core\Installer\Exception\AlreadyInstalledException: 
To start over, you must empty your existing database and copy default.settings.php over settings.php.
To upgrade an existing installation, proceed to the update script.
View your existing site.
 in install_begin_request() (line 481 of /var/www/html/core/includes/install.core.inc). install_begin_request(Object, Array)
install_drupal(Object, Array)
Drupal\simpletest\WebTestBase->doInstall(Array)
Drupal\simpletest\WebTestBase->setUp()
Drupal\aggregator\Tests\AggregatorTestBase->setUp()
Drupal\simpletest\TestBase->run(Array)
simpletest_script_run_one_test('10', 'Drupal\aggregator\Tests\DeleteFeedItemTest')
exception: [Uncaught exception] Line 900 of core/includes/install.core.inc:
Drupal\Core\Installer\Exception\InstallerException: Errors: Drupal could not be correctly setup with the existing database. Revise any errors. in install_get_form() (line 900 of /var/www/html/core/includes/install.core.inc). install_get_form('Drupal\Core\Installer\Form\SiteSettingsForm', Array)
install_run_task(Array, Array)
install_run_tasks(Array)
install_drupal(Object, Array)
Drupal\simpletest\WebTestBase->doInstall(Array)
Drupal\simpletest\WebTestBase->setUp()
Drupal\views\Tests\ViewTestBase->setUp()
Drupal\block_content\Tests\Views\RevisionRelationshipsTest->setUp()
Drupal\simpletest\TestBase->run(Array)
simpletest_script_run_one_test('77', 'Drupal\block_content\Tests\Views\RevisionRelationshipsTest')

Seem to be the two errors we are seeing - for more see https://www.drupal.org/pift-ci-job/26487

alexpott’s picture

I'm doing investigations in #2561915: alexpott's test issue

alexpott’s picture

Status: Active » Needs review
StatusFileSize
new1.27 KB

Worked it out... Postgres's installer tasks does not work in a concurrent situation since it running queries that affect the whole database and we're using prefixes.

dawehner’s picture

StatusFileSize
new1.82 KB
new866 bytes

Good catch!

Added some documentation to explain the problem you saw.

alexpott’s picture

So the two postgres fails in #11/#12 have issues with green patches on! woot :) #2561229: Upgrade content tests fails on postgres for translated comment and #2561129: Composite indexes are not correctly deleted/re-created when updating a field storage definition. I feel a green postgres testsuite round around the corner.

plach’s picture

Status: Needs review » Reviewed & tested by the community

Looks great

  • catch committed 7210716 on 8.0.x
    Issue #2561121 by dawehner, alexpott: Installer fails on postgresql due...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Nice one tracking this down. Fix itself is very straightforward for a tricky bug.

Committed/pushed to 8.0.x, thanks!

Status: Fixed » Needs work

The last submitted patch, 12: 2561121-12.patch, failed testing.

plach’s picture

Status: Needs work » Fixed

bot--

Status: Fixed » Closed (fixed)

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