Page MenuHomePhabricator

Rollback edit count not calculated correctly on PostgreSQL
Closed, ResolvedPublic0 Estimated Story Points

Description

I created a new test for the rollback link generation at LinkerTest::testGenerateRollback. On my local machine this test was behaving as expected. However, when running the tests on mediawiki-quibble-vendor-postgres-php70-docker, they keep failing due to the fact that the number of rollbacks returned by Linker::getRollbackEditCount was wrong (in the case of this test, it returns 0 instead of the correct count of 1). I fail to see why the behavior of PostgreSQL seems to differ here, I assume it has something to do with how the data is queried in getRollbackEditCount but it is hard to say without having a local PostgreSQL setup.

For now, the aforementioned test method will use $this->markTestSkippedIfDbType( 'postgres' ); to skip this test for PostgreSQL (this is also done for some other tests throughout the codebase) but it's something that should be looked into.

Event Timeline

Tim_WMDE renamed this task from Rollback edit count not calculated corrected on PostgreSQL to Rollback edit count not calculated correctly on PostgreSQL.Mar 15 2019, 3:08 PM

Change 756054 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] Linker::getRollbackEditCount confused on revision with same timestamp

https://gerrit.wikimedia.org/r/756054

Change 756054 merged by jenkins-bot:

[mediawiki/core@master] Linker::getRollbackEditCount confused on revisions with same timestamp

https://gerrit.wikimedia.org/r/756054

Umherirrender triaged this task as Lowest priority.