hashar added subscribers: Silvan_WMDE, Jakob_WMDE, hashar. hashar added a comment.
The `Wikibase\DataModel\Tests\ReferenceListTest::testSerializationStability` is: /** * This test will change when the serialization format changes. * If it is being changed intentionally, the test should be updated. * It is just here to catch unintentional changes. */ public function testSerializationStability() { $list = new ReferenceList(); $list->addNewReference( new PropertyNoValueSnak( 1 ) ); /* * https://wiki.php.net/rfc/custom_object_serialization */ if ( version_compare( phpversion(), '7.4', '>=' ) ) { $testString = "a:1:{i:0;O:28:\"Wikibase\\DataModel\\Reference\":1:{s:35:\"\x00Wikibase\\DataModel\\" . "Reference\x00snaks\";O:32:\"Wikibase\\DataModel\\Snak\\SnakList\":2:{s:4:\"" . 'data";a:1:{i:0;C:43:"Wikibase\\DataModel\\Snak\\PropertyNoValueSnak":2:{P1}}s:5' . ':"index";i:0;}}}'; } else { $testString = "a:1:{i:0;O:28:\"Wikibase\\DataModel\\Reference\":1:{s:35:\"\x00Wikibase\\DataModel\\" . "Reference\x00snaks\";C:32:\"Wikibase\\DataModel\\Snak\\SnakList\":100:{a:2:{s:4:\"" . 'data";a:1:{i:0;C:43:"Wikibase\\DataModel\\Snak\\PropertyNoValueSnak":2:{P1}}s:5' . ':"index";i:0;}}}}'; } $this->assertSame( $testString, $list->serialize() ); } It does take in account serialization has changed with php 7.4 and the code is correct. The test fails on our CI because we have patched php7.4 to use the old serialization format, the switch got made as part of upgrading Quibble to 1.4.6 https://gerrit.wikimedia.org/r/c/integration/config/+/828611 The reason we had to patch php 7.4 is the Wikimedia cluster currently runs a mix of php 7.2 and 7.4. Thus when a process runs under php 7.4, the serialized object is stored in the cache with the new format. When a later process running with php 7.2 attempts to unserialize the new format, it fails leading to T316601 <https://phabricator.wikimedia.org/T316601>. The approach we took was to patch php 7.4 to use the old format as described at T316601#8201209 <https://phabricator.wikimedia.org/T316601#8201209>. This way we can finish the migration on the Wikimedia cluster. For this failing test, it means that even if it varies its expectations based on `phpversion() >= 7.4`, when it runs on our patched php 7.4 the serialization is done with the old format. The test break. @Jakob_WMDE and @Silvan_WMDE raised it on IRC in `#wikimedia-releng`. We concluded the easiest course of action right now is to mark the test skipped and restore it once Wikimedia has fully migrated to php 7.4 and that we move the CI images to the original php 7.4 version. TASK DETAIL https://phabricator.wikimedia.org/T243590 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: toan, hashar Cc: hashar, Jakob_WMDE, Silvan_WMDE, kostajh, Pablo-WMDE, WMDE-leszek, Daimona, Jdforrester-WMF, srishakatux, Reedy, Addshore, Aklapper, Astuthiodit_1, karapayneWMDE, Invadibot, maantietaja, ItamarWMDE, Akuckartz, Iflorez, alaa_wmde, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Lydia_Pintscher, Nikerabbit, MaxSem, Mbch331
_______________________________________________ Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org