Page MenuHomePhabricator

Add PageTriage to gated extensions
Closed, ResolvedPublic

Description

PageTriage is an important tool for moderating content on English Wikipedia. We might eventually expand its usage to other wikis (T50552: Make PageTriage wiki agnostic). Even though it's mainly on one wiki, IMO we can justify its inclusion in gated extensions and the resulting additional build time because:

  • the tests for the extension run quickly (php tests/phpunit/phpunit.php extensions/PageTriage/tests/phpunit/ is about ~18s)
  • There have been several CI breakages where updates to MediaWiki core or other extensions result in CI being broken for PageTriage, which is then time-consuming to debug (most recent example T333535: SpecialPageFatalTest::testSpecialPageDoesNotFatal)
  • The extension is an important part of the moderator infrastructure on the largest language Wikipedia

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 904488 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[integration/config@master] zuul: Add PageTriage to gatedextensions

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

kostajh updated the task description. (Show Details)

For my own learning, is the "gate" documented anywhere? Is that just a fancy term for CI that is run on MediaWiki release branches?

For my own learning, is the "gate" documented anywhere? Is that just a fancy term for CI that is run on MediaWiki release branches?

It's a fancy term for running some key extensions' tests on changes made to other extensions / core. There is a documentation stub. (Although some other things are called gate as well; gating is Zuul terminology, and it just means merging will be held up until some tests pass.)

kostajh changed the task status from Open to In Progress.Apr 28 2023, 10:31 AM
kostajh triaged this task as Low priority.

Change 904488 merged by jenkins-bot:

[integration/config@master] zuul: Add PageTriage to gatedextensions

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

I've had to revert the above patch. There are two separate issues I was seeing, one was with CA that we believe was caused by another change that was just merged from core, but I think the following (which was seen on a empty core change) was caused by this change:

23:30:04 1) ResourcesTest::testMissingMessages
23:30:04 Message 'wikilove' required by 'ext.pageTriage.views.toolbar' must exist
23:30:04 Failed asserting that false is true.

https://integration.wikimedia.org/ci/job/wmf-quibble-core-vendor-mysql-php74-docker/19931/console

Looks like ResourcesTest::testMissingMessages is a test in core.

https://gerrit.wikimedia.org/g/mediawiki/core/+/458d31979830f90d77ca07c6d550afd2b3d13bf0/tests/phpunit/structure/ResourcesTest.php#82

Wikilove is an optional extension for PageTriage. If Wikilove is installed, PageTriage displays an extra button on the Page Curation toolbar.

I wonder what the fix for this test is.

Ideally the core test would pass without WikiLove installed, since it's now only an optional dependency. A short-term fix would be to add WikiLove to the gate too.

Change 939291 had a related patch set uploaded (by Majavah; author: Majavah):

[integration/config@master] zuul: [mediawiki/extensions/PageTriage] Add to gate

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

For my own learning, is the "gate" documented anywhere? Is that just a fancy term for CI that is run on MediaWiki release branches?

As far as I know, it is not documented. That results from an initiative from roughly 2014/2015 which eventually got lost. The idea is to prevent regressions between MediaWiki, extensions and skins by having them all run all the tests whenever a change is proposed. That is what the wmf-quibble-* jobs are doing. It is only for the master branch and the wmf branch. A more or less similar system exists for release branches but I don't think it is complete.

From that era, I have added a test suite in integration/config which gives a bit of idea of all the inconsistencies. It can be run from that repo using tox -e qa (and still requires python2.7). For convenience it is still running on a daily basis (I have fixed the test reporting) and the report can be found at https://integration.wikimedia.org/ci/job/integration-config-qa/lastBuild/testReport/tests/test_zuul_gate_and_dependencies/ There are gaps :)

Regardless I guess we can try adding PageTriage and Wikilove and see what happens. Upon deployment one will have to check whether the wmf-quibble* jobs still pass fine (they might fail if there another extension is needed). I will deploy the changes tomorrow.

Change 939291 merged by jenkins-bot:

[integration/config@master] zuul: [mediawiki/extensions/PageTriage] Add to gate

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

Mentioned in SAL (#wikimedia-releng) [2023-07-20T07:40:30Z] <hashar> Reloaded Zuul to add PageTriage to gated extensions | T333534

Of the 5 linked tickets...

  • T356704 - doesn't affect the gate, only local PageTriage CI, broken tests deleted on Feb 7
  • T355797 - duplicate, will go ahead and close
  • T352714 - experimental tests only so does not affect the gate
  • T355089 - I don't think this affected the gate if I remember correctly, an upstream change to MediaWiki broke ORES CI which trickled down to PageTriage CI
  • T355362 - flaky selenium test affected the gate, resolved on Feb 7

So I think only one of these issues affected the gate. Up to y'all though.