Page MenuHomePhabricator

AntiSpoof extension does not pass quibble-vendor-mysql-php70-docker
Closed, ResolvedPublic

Description

The quibble-vendor-mysql-php70-docker from experimental run is failing for AntiSpoof
https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php70-docker/3080/console trigged by https://gerrit.wikimedia.org/r/#/c/433891/

There were 2 failures:

1) SpoofUserTest::testGetConflicts with data set #1 ('FooBaz', array('F00BAZ', 'FOOBAZ', 'FooBaz'))
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     0 => 'F00BAZ'
     1 => 'FOOBAZ'
-    2 => 'FooBaz'

/workspace/src/tests/phpunit/MediaWikiTestCase.php:1790
/workspace/src/extensions/AntiSpoof/tests/phpunit/SpoofUserTest.php:56
/workspace/src/tests/phpunit/MediaWikiTestCase.php:423
/workspace/src/maintenance/doMaintenance.php:94

2) SpoofUserTest::testUpdate
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     0 => 'BazF00'
-    1 => 'BazFoo'

/workspace/src/tests/phpunit/MediaWikiTestCase.php:1790
/workspace/src/extensions/AntiSpoof/tests/phpunit/SpoofUserTest.php:79
/workspace/src/tests/phpunit/MediaWikiTestCase.php:423
/workspace/src/maintenance/doMaintenance.php:94

FAILURES!
Tests: 1295, Assertions: 22893, Failures: 2.

The failing test is a php7.0 test, so adding the tag for it

Event Timeline

This depends on the locale your database is using, because in the test results only entries are missing which also exists in upper case and camel case inside the test (see the list in $usernames)

I can fix this by using binary varchar in the extension. I am not sure, if that is the best solution just to fix tests.
Or does this test now catch a problem for wikis using non-binary locales?

Change 433950 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/extensions/AntiSpoof@master] Rework database design

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

Is this Schema-change / Schema-change-in-production ? I've added @Marostegui on the patch nonetheless. Thanks.

Is this Schema-change / Schema-change-in-production ? I've added @Marostegui on the patch nonetheless. Thanks.

I would see T193532 as the schema change bug. The Schema-change-in-production is needed when the schema change must be run in production and is created after the merge of the Schema-change bug (thats my understanding).

The quibble* jobs runs with MariaDB with the collation latin1_swedish_ci. Maybe that ci stands for case insensitive? The Nodepool jobs use MySQL with apparently the same collation.

MariaDB has been changed in the Quibble containers to use binary. 7d740b5167e1625c690d6f59b6b0e0ac35c4694d T193222

--- a/dockerfiles/quibble-stretch/mariadb.cnf
+++ b/dockerfiles/quibble-stretch/mariadb.cnf
 [mysqld]
+character_set_server     = binary
+character_set_filesystem = binary
+collation_server         = binary

I have triggered the Quibble jobs against the dummy change https://gerrit.wikimedia.org/r/c/mediawiki/extensions/AntiSpoof/+/54376

And it passed just fine!

So for the CI migration it is fixed, it is probably still worth doing the database schema change though.

Change 440298 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] Migrate to Quibble extensions blocked by AntiSpoof

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

@Umherirrender seems like using binary has a database character set fix the test. Thus I am not sure whether the database is still needed, but then I havent looked at your change.

Change 440298 merged by jenkins-bot:
[integration/config@master] Migrate to Quibble extensions blocked by AntiSpoof

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

Change 433950 abandoned by Umherirrender:
Use binary collation in mysql for varchars

Reason:
Tests now passed by using binary as default collation

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

Umherirrender triaged this task as Medium priority.
Vvjjkkii renamed this task from AntiSpoof extension does not pass quibble-vendor-mysql-php70-docker to 3pcaaaaaaa.Jul 1 2018, 1:10 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii raised the priority of this task from Medium to High.
Vvjjkkii updated the task description. (Show Details)
CommunityTechBot renamed this task from 3pcaaaaaaa to AntiSpoof extension does not pass quibble-vendor-mysql-php70-docker.Jul 1 2018, 8:38 PM
CommunityTechBot closed this task as Resolved.
CommunityTechBot claimed this task.
CommunityTechBot lowered the priority of this task from High to Medium.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: gerritbot.