Lucas_Werkmeister_WMDE created this task.
Lucas_Werkmeister_WMDE added projects: Wikidata, wmde-wikidata-tech, Shape 
Expressions, MediaWiki-extensions-FlaggedRevs.
Restricted Application added a subscriber: Aklapper.

TASK DESCRIPTION
  Ever since we added Wikibase to EntitySchema’s CI (T333661 
<https://phabricator.wikimedia.org/T333661>), two PHPUnit tests have been 
failing (example console 
<https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php74-noselenium-docker/93541/console>):
  
  counterexample
    1) 
EntitySchema\Tests\Integration\MediaWiki\Actions\RestoreSubmitActionTest::testRestoreSubmit
    Failed asserting that two strings are identical.
    --- Expected
    +++ Actual
    @@ @@
    -'abc'
    +'def'
    
    
/workspace/src/extensions/EntitySchema/tests/phpunit/integration/MediaWiki/Actions/RestoreSubmitActionTest.php:71
    
    2) 
EntitySchema\Tests\Integration\MediaWiki\Actions\RestoreViewActionTest::testRestoreView
    Failed asserting that '<div class="mw-message-box-error mw-message-box">The 
revision you tried to restore is identical to the current revision. Nothing to 
do.</div><p id="mw-returnto">Return to <a href="/index.php/EntitySchema:E1234" 
title="EntitySchema:E1234">EntitySchema:E1234</a>.</p>\n
    ' contains "<ins class="diffchange diffchange-inline">abc</ins>".
    
    
/workspace/src/extensions/EntitySchema/tests/phpunit/integration/MediaWiki/Actions/RestoreViewActionTest.php:78
  
  This is reproducible locally iff FlaggedRevisions is installed; it turns out 
that FlaggedRevs is a very indirect CI dependency of Wikibase (Wikibase → 
ArticlePlaceholder → Scribunto → SyntaxHighlight_GeSHi → VisualEditor → 
FlaggedRevs), and thus it’s now loaded in EntitySchema CI as well. Tracking 
calls to `Title::loadFromRow()` reveals the culprit:
  
  name=(most rows removed for brevity)
    /var/www/html/wiki1/includes/title/Title.php:620:
    class stdClass#3344 (12) {
      public $page_title =>
      string(5) "E1234"
      public $page_latest =>
      string(1) "2"
    }
    /var/www/html/wiki1/includes/title/Title.php:620:
    class stdClass#3349 (18) {
      public $page_title =>
      string(5) "E1234"
      public $page_latest =>
      string(1) "2"
    }
    /var/www/html/wiki1/includes/title/Title.php:620:
    class stdClass#3349 (18) {
      public $page_title =>
      string(5) "E1234"
      public $page_latest =>
      string(1) "2"
      public $fpc_override =>
      NULL
    }
    /var/www/html/wiki1/includes/title/Title.php:620:
    class stdClass#3299 (11) {
      public $page_title =>
      string(5) "E1234"
      public $page_latest =>
      string(1) "2"
    }
    /var/www/html/wiki1/includes/title/Title.php:620:
    class stdClass#3820 (12) {
      public $page_title =>
      string(5) "E1234"
      public $page_latest =>
      string(1) "3"
    }
    /var/www/html/wiki1/includes/title/Title.php:620:
    class stdClass#3349 (18) {
      public $page_title =>
      string(5) "E1234"
      public $page_latest =>
      string(1) "2"
      public $fpc_override =>
      NULL
    }
    /var/www/html/wiki1/includes/title/Title.php:620:
    class stdClass#3349 (18) {
      public $page_title =>
      string(5) "E1234"
      public $page_latest =>
      string(1) "2"
      public $fpc_override =>
      NULL
    }
    /var/www/html/wiki1/includes/title/Title.php:620:
    class stdClass#3924 (11) {
      public $page_title =>
      string(5) "E1234"
      public $page_latest =>
      string(1) "3"
    }
  
  Notice that there are two calls with `$page_latest => 2` after the first call 
with `$page_latest => 3`, i.e., they’re resetting the latest revision ID to an 
outdated value; this is what causes the tests to fail, because they now load a 
non-latest revision as the latest revision. (It can be worked around in the 
tests with e.g. `$page->getTitle()->resetArticleID( false );` or 
`TestingAccessWrapper::newFromObject( $page->getTitle() )->mLatestID = 
false;`.) And both of those calls have an `$fpc_override` column in the row, 
identifying them as coming from (or at least being influenced by) FlaggedRevs.
  
  Ceterum censeo FlaggedRevs esse delendam.

TASK DETAIL
  https://phabricator.wikimedia.org/T334464

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Lucas_Werkmeister_WMDE
Cc: Aklapper, Lucas_Werkmeister_WMDE, Astuthiodit_1, karapayneWMDE, Invadibot, 
Asartea, maantietaja, ItamarWMDE, Akuckartz, Dzaky17, pdehaye, DannyS712, 
Nandana, Lahi, Gq86, Andrawaag, GoranSMilovanovic, QZanden, 
YULdigitalpreservation, LawExplorer, Salgo60, _jensen, rosalieper, XanonymusX, 
Scott_WUaS, Cirdan, MisterSynergy, abian, Zache, Wikidata-bugs, aude, jeblad, 
Tacsipacsi, Lydia_Pintscher, Ladsgroup, Jackmcbarn, Mbch331
_______________________________________________
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org

Reply via email to