Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This issue is part of #2157455: [Meta] Make Drupal 8 work with PostgreSQL or remove support from core before release.
List of failing tests within the node test group identified by the new docker based testbot.
Comment | File | Size | Author |
---|
Comments
Comment #1
bzrudi71 CreditAttribution: bzrudi71 commentedAnd again some failing tests because of revsions
Comment #2
mradcliffenode/1/revision/1/delete when the default revision is 2. isDefaultRevision() returns true despite vid = 1 on the node object being checked. This returns access denied.
Looking deeper into node revision handling and mapFromStorageRecords...
The records query result has a property "isdefaultrevision" which case sensitively is never mentioned in core. It's "isDefaultRevision" property that defaults to TRUE. An expression is added to the query that sets this property to false based on a Sql conditional (When statement). There's an issue that's related to case sensitivity for PostgreSQL: #1600670: Cannot query Postgres database that has column names with capital letters
core//lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php:
As an aside, this line seems to be very unfriendly to non-sql drivers in NodeRevisionDeleteForm:
Comment #3
bzrudi71 CreditAttribution: bzrudi71 commentedPatch from #1600670: Cannot query Postgres database that has column names with capital letters fixed the revision tests, but opens some others because of double quoting. See testbot results in the mentioned issue.
(Hope to get over my terrible cold within the next days...)
Comment #4
jaredsmith CreditAttribution: jaredsmith commentedI realize that this doesn't fix all of the failing tests, but this patch does fix one exception with a failed SQL query causing an exception in NodeTranslationUITest. I'm adding this so that I don't lose it before I get a chance to tackle more exceptions and failed tests.
In PostgreSQL, you can't use an alias to refer to a column in a HAVING clause.
Comment #5
jaredsmith CreditAttribution: jaredsmith commentedComment #6
bzrudi71 CreditAttribution: bzrudi71 commentedGreat catch! Can you please try a testbot run with your patch and #1600670: Cannot query Postgres database that has column names with capital letters combined? Guess we should get near to 100% pass with both patches applied!?
E.g.
DCI_PATCH='https://www.drupal.org/files/issues/drupal-1600670-postgres-capital-letters-70.patch,.;https://www.drupal.org/files/issues/2356987-2-fix_database_exception.patch,.'
Comment #7
jaredsmith CreditAttribution: jaredsmith commentedI re-ran my tests using the drupalci support for PostgreSQL using the following settings, including the two patches mentioned in comment #6.
DCI_PHPVERSION=5.5
DCI_DRUPALBRANCH=8.0.x
DCI_TESTGROUPS=node
DCI_UPDATEREPO=TRUE
DCI_DBTYPE=pgsql
DCI_DBVER=9.1
DCI_PATCH='https://www.drupal.org/files/issues/drupal-1600670-postgres-capital-lett...,.'
Unfortunately, we still have two failing tests (Drupal\node\Tests\NodeCreationTest and Drupal\node\Tests\NodeTypeRenameConfigImportTest), and a fatal error (Base lambda function for closure not found in /var/www/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php on line 387).
The complete listing of tests is in the attached text file.
Comment #8
mradcliffeThe NodeCreationTest and NodeTypeRenameConfigImportTest fails may just be exposed with the capital letters patch.
I haven't seen the SqlContentEntityStorage issue yet. I wonder if that fails for MySQL as well?
Comment #9
jaredsmith CreditAttribution: jaredsmith commentedNo, these tests fail with or without the capital letters patch. There must be something else going on here.
In the case of the
NodeCreationTest
problem, the failure notice from the test is:Rollback explanatory error logged to watchdog.
From what I've found, a database exception isn't being properly logged to the
watchdog
table as it should.In the case of the
NodeTypeRenameConfigImportTest
problem, the failure notice from the test is:I haven't yet begun to track down the cause of this failure.
I can't reproduce this issue today, so it was probably something broken in head that has since been fixed, or some sort of intermittent issue. I'm not going to to worry about it unless it comes back to haunt me.
I'm attaching the latest results from the tests with the capital letters patch and the database exception patch (from comment 4).
Comment #10
mradcliffeHmm, that fail looks like a sorting issue for config entities. The schema is the same, but the keys are re-ordered in the comparison.
Comment #11
bzrudi71 CreditAttribution: bzrudi71 commentedYes, for the
NodeTypeRenameConfigImportTest
it looks like we hit a missing order by again. I'm more worried aboutNodeCreationTest
. I verified that the actual value is logged in to watchdog, but the query does a select from bytea and this may require that we need to think about #2238253: Add bindValue to a PDO::PARAM_* type in database query arguments :-(But this needs investigation, just speculation from my short look at the test...
Comment #12
bzrudi71 CreditAttribution: bzrudi71 commentedHmm, see Connection.php ;-)
Comment #13
jaredsmith CreditAttribution: jaredsmith commented@bzrudi71, can you please give more detail on the INSERT query being used to write the information to the watchdog table, as well as the SELECT statement used to retrieve it?
Comment #14
bzrudi71 CreditAttribution: bzrudi71 commented@jaredsmith: I just did a quick additional query for all variables in watchdog:
This shows that the watchdog message (Test exception for rollback) is logged:
So it's not a problem with the INSERT...
BTW: I'm offline until next Wednesday!
Comment #15
bzrudi71 CreditAttribution: bzrudi71 commentedComment #16
bzrudi71 CreditAttribution: bzrudi71 commentedCreated all required sub-issues.
Comment #17
bzrudi71 CreditAttribution: bzrudi71 commentedMoved patch from #4 over to new sub issue #2443669: PostgreSQL: Fix node\Tests\NodeTranslationUITest.
Comment #18
bzrudi71 CreditAttribution: bzrudi71 commentedComment #19
bzrudi71 CreditAttribution: bzrudi71 commentedWe made it, no more fails in node group tests, thanks all :-)